Vector3 class

Vector3 class

A vector with three components.

The Vector3 type exposes the following members:

Constructors

ConstructorDescription
initInitializes a new instance of the Vector3 struct.
initInitializes a new instance of the Vector3 struct.
initInitializes a new instance of the Vector3 struct.
initInitializes a new instance of the Vector3 struct.
initConstructs a new instance of Vector3

Properties

PropertyDescription
length2Gets the square of the length.
lengthGets the length of this vector.
xThe x component.
yThe y component.
zThe z component.
ORIGINGets the origin position.
UNIT_SCALEGets the unit scale vector.
X_AXISGets the X axis.
Y_AXISGets the Y axis.
Z_AXISGets the Z axis.

Methods

MethodDescription
angle_betweenCalculate the inner angle between two direction
Two direction can be non-normalized vectors
angle_betweenCalculate the inner angle between two direction
Two direction can be non-normalized vectors
dotGets the dot product of two vectors
normalizeNormalizes this instance.
sinCalculates sine on each component
cosCalculates cosine on each component
crossCross product of two vectors
setSets the x/y/z component in one call.
compare_toCompare current vector to another instance.

See Also