Properties | |
Number | x |
Number | y |
Number | z |
Methods | |
void | abs () |
DzVec3 | add (DzVec3 vec) |
DzVec3 | cross (DzVec3 vec) |
DzVec3 | divide (DzVec3 vec) |
Number | dot (DzVec3 vec) |
Number | getAngleTo (DzVec3 vec) |
DzQuat | getRotationTo (DzVec3 vec) |
void | identity () |
Number | length () |
Number | lengthSquared () |
DzVec3 | multiply (DzVec3 vec) |
void | negate () |
void | normalize () |
DzVec3 | normalized () |
void | setLength (Number length) |
void | square () |
DzVec3 | subtract (DzVec3 vec) |
void | zero () |
Properties | |
DzVec3 (DzVec3 vec) | |
DzVec3 (Number x, Number y, Number z) | |
DzVec3 () |
DzVec3::DzVec3 | ( | ) |
Default Constructor. Creates an uninitialized vector.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Creates and inititializes the vector with 3 floats.
DzVec3::DzVec3 | ( | DzVec3 | vec | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Copy Constructor.
void DzVec3::abs | ( | ) |
Takes absolute value of each component.
void DzVec3::identity | ( | ) |
Sets this vector to the identity vector (1, 1, 1)
Number DzVec3::length | ( | ) |
Number DzVec3::lengthSquared | ( | ) |
void DzVec3::negate | ( | ) |
Negates each component of the vector.
float DzVec3::normalize | ( | ) |
Makes this vector unit length
DzVec3 DzVec3::normalized | ( | ) |
void DzVec3::setLength | ( | Number | length | ) |
Sets the vector to have the length given with the current direction.
void DzVec3::square | ( | ) |
Squares each vector component individually.
void DzVec3::zero | ( | ) |
Sets this vector to (0, 0, 0)