Name | Summary |
---|---|
Vector3 | constructor(v: Float) Constructor for creating a Vector3 with all components set to the same value. constructor(c: <Error class: unknown class>) Constructor for creating a Vector3 from a Color object. constructor(x: Float, y: Float, z: Float) |
Name | Summary |
---|---|
Companion | object Companion |
Name | Summary |
---|---|
x | var x: Float |
y | var y: Float |
z | var z: Float |
Name | Summary |
---|---|
add | fun add(v: Vector3): Vector3 Adds two vectors component-wise. |
angleBetweenDegrees | fun angleBetweenDegrees(v: Vector3): Float Calculates the angle between two vectors in degrees. |
cross | fun cross(other: Vector3): Vector3 Calculates the cross product of two vectors. |
distanceTo | fun distanceTo(v: Vector3): Float Calculates the distance between two vectors. |
div | operator fun div(v: Float): Vector3 Divides a vector by a scalar. |
divide | fun divide(v: Float): Vector3 Divides a vector by a scalar. |
dot | fun dot(v: Vector3): Float Calculates the dot product of two vectors. |
length | fun length(): Float Calculates the length (magnitude) of a vector. |
lerp | fun lerp(dest: Vector3, ratio: Float): Vector3 Linearly interpolates between two vectors. |
max | fun max(v: Vector3): Vector3 Returns a vector with the maximum components of this vector and another vector. |
min | fun min(v: Vector3): Vector3 Returns a vector with the minimum components of this vector and another vector. |
minus | operator fun minus(v: Vector3): Vector3 Subtracts two vectors component-wise. |
multiply | fun multiply(v: Vector3): Vector3 Multiplies two vectors component-wise. fun multiply(v: Float): Vector3 Multiplies a vector by a scalar. |
negate | fun negate(): Vector3 Negates a vector. |
normalize | fun normalize(): Vector3 Normalizes a vector to have a length of 1 |
plus | operator fun plus(v: Vector3): Vector3 Adds two vectors component-wise. |
setX | fun setX(x: Float): Vector3 |
setY | fun setY(y: Float): Vector3 |
setZ | fun setZ(z: Float): Vector3 |
sub | fun sub(v: Vector3): Vector3 Subtracts two vectors component-wise. |
times | operator fun times(v: Vector3): Vector3 Multiplies two vectors component-wise. operator fun times(v: Float): Vector3 Multiplies a vector by a scalar. |
toString | open override fun toString(): String Returns a string representation of the vector. |
unaryMinus | operator fun unaryMinus(): Vector3 Negates a vector. |
Name | Summary |
---|---|
Forward | val Forward: Vector3 |
Right | val Right: Vector3 |
Up | val Up: Vector3 |