Novelty scripting reference > Types > Vector3

Vector3

Three-dimentional vector.

Members

float x
float y
float z


Constructors

Vector3()
Vector3(const Vector3 &in other)
Vector3(float x, float y, float z)


Methods

void Set(float x, float y, float z)
Set values.

void Add(float x, float y, float z)
void Add(const Vector3 &in other)
Add another vector.

void Sub(float x, float y, float z)
void Sub(const Vector3 &in other)
Subtract another vector.

void Scale(float factor)
Scale the vector by a factor.

void Interpolate(const Vector3 &in other, float value)
Do a linear interpolation between the vector and another.

float SquareLength() const
Returns square length of the vector.

float Length() const
Returns length of the vector.

float Dot(const Vector3 &in other) const
Calculates the dot product of the vector.

Vector3 Cross(const Vector3 &in other) const
Calculates the cross between of the vector and another.

void Normalize()
Normalize the vector.

Vector3 Normalized() const
Returns a normalized vector.

string AsString() const
Returns the vector as a string


Back to top