#include <vhdVector3.h>
vhdVector3::vhdVector3 | ( | ) | [inline] |
vhdVector3::vhdVector3 | ( | vhtReal | afCoordinate[3] | ) | [inline] |
vhdVector3::vhdVector3 | ( | int | afCoordinate[3] | ) | [inline] |
vhdVector3::vhdVector3 | ( | const vhtReal *const | r | ) | [inline] |
vhdVector3::vhdVector3 | ( | const vhdVector3 & | rkVector | ) | [inline] |
vhtReal vhdVector3::get | ( | unsigned int | index | ) | const [inline] |
void vhdVector3::set | ( | unsigned int | index, | |
vhtReal | value | |||
) | [inline] |
vhtReal & vhdVector3::operator[] | ( | int | index | ) | const [inline] |
vhdVector3::operator vhtReal * | ( | ) | [inline] |
Cast operator for vhtReal*.
vhdVector3::operator const vhtReal * | ( | ) | const [inline] |
Cast operator for const vhtReal*.
vhdVector3 & vhdVector3::operator= | ( | const vhdVector3 & | rkVector | ) | [inline] |
Assigns the value of the other vector.
rkVector | The other vector |
bool vhdVector3::operator== | ( | const vhdVector3 & | rkVector | ) | const [inline] |
bool vhdVector3::operator!= | ( | const vhdVector3 & | rkVector | ) | const [inline] |
bool vhdVector3::isZero | ( | ) | const [inline] |
Returns true if this vector is zero (all elements < epsilon).
bool vhdVector3::isUnit | ( | ) | const [inline] |
Returns true if this vector is a unit-length vector. Also considers floating-point imprecision by using epsilon.
vhdVector3 vhdVector3::operator+ | ( | const vhdVector3 & | rkVector | ) | const [inline] |
vhdVector3 vhdVector3::operator- | ( | const vhdVector3 & | rkVector | ) | const [inline] |
vhdVector3 vhdVector3::operator * | ( | vhtReal | fScalar | ) | const [inline] |
vhdVector3 vhdVector3::operator * | ( | const vhdVector3 & | rhs | ) | const [inline] |
vhdVector3 vhdVector3::operator/ | ( | vhtReal | fScalar | ) | const [inline] |
vhdVector3 vhdVector3::operator- | ( | ) | const [inline] |
vhdVector3 & vhdVector3::operator+= | ( | const vhdVector3 & | rkVector | ) | [inline] |
vhdVector3 & vhdVector3::operator-= | ( | const vhdVector3 & | rkVector | ) | [inline] |
vhdVector3 & vhdVector3::operator *= | ( | vhtReal | fScalar | ) | [inline] |
vhdVector3 & vhdVector3::operator/= | ( | vhtReal | fScalar | ) | [inline] |
vhdVector3 & vhdVector3::operator *= | ( | const vhdVector3 & | rkVector | ) | [inline] |
vhdVector3 & vhdVector3::operator/= | ( | const vhdVector3 & | rkVector | ) | [inline] |
vhtReal vhdVector3::length | ( | ) | const [inline] |
Returns the length (magnitude) of the vector.
vhtReal vhdVector3::squaredLength | ( | ) | const [inline] |
Returns the square of the length(magnitude) of the vector.
vhtReal vhdVector3::dotProduct | ( | const vhdVector3 & | vec | ) | const [inline] |
Calculates the dot (scalar) product of this vector with another.
vec | Vector with which to calculate the dot product (together with this one). |
vhdVector3 & vhdVector3::normalise | ( | ) | [inline] |
Normalises the vector.
vhdVector3 vhdVector3::getNormalized | ( | ) | const [inline] |
Returns a normalized version of this vector.
vhdVector3 vhdVector3::crossProduct | ( | const vhdVector3 & | rkVector | ) | const [inline] |
Calculates the cross-product of 2 vectors, i.e. the vector that lies perpendicular to them both.
vec | Vector which, together with this one, will be used to calculate the cross-product. |
vhdVector3 vhdVector3::midPoint | ( | const vhdVector3 & | vec | ) | const [inline] |
Returns a vector at a point half way between this and the passed in vector.
bool vhdVector3::operator< | ( | const vhdVector3 & | rhs | ) | const [inline] |
Returns true if the vector's scalar components are all greater that the ones of the vector it is compared against.
bool vhdVector3::operator> | ( | const vhdVector3 & | rhs | ) | const [inline] |
Returns true if the vector's scalar components are all smaller that the ones of the vector it is compared against.
void vhdVector3::makeFloor | ( | const vhdVector3 & | cmp | ) | [inline] |
Sets this vector's components to the minimum of its own and the ones of the passed in vector.
void vhdVector3::makeCeil | ( | const vhdVector3 & | cmp | ) | [inline] |
Sets this vector's components to the maximum of its own and the ones of the passed in vector.
vhdVector3 vhdVector3::perpendicular | ( | void | ) | [inline] |
Generates a vector perpendicular to this vector (eg an 'up' vector).
vhdVector3 vhdVector3::randomDeviant | ( | vhtReal | angle, | |
const vhdVector3 & | up = vhdVector3::ZERO | |||
) | [inline] |
Generates a new random vector which deviates from this vector by a given angle in a random direction.
angle | The angle at which to deviate in radians | |
up | Any vector perpendicular to this one (which could generated by cross-product of this vector and any other non-colinear vector). If you choose not to provide this the function will derive one on it's own, however if you provide one yourself the function will be faster (this allows you to reuse up vectors if you call this method more than once) |
vhdQuaternion vhdVector3::getRotationTo | ( | const vhdVector3 & | dest | ) | const |
vhtReal vhdVector3::distance | ( | const vhdVector3 & | point | ) | const [inline] |
Returns distance between this vector and argument vector
vhtReal vhdVector3::squaredDistance | ( | const vhdVector3 & | point | ) | const [inline] |
Returns distance between this vector and argument vector
void vhdVector3::generateOrthonormalBasis | ( | vhdVector3 & | rkU, | |
vhdVector3 & | rkV, | |||
vhdVector3 & | rkW, | |||
bool | bUnitLengthW | |||
) | [static] |
vhdVector3 operator * | ( | vhtReal | fScalar, | |
const vhdVector3 & | rkVector | |||
) | [friend] |
std::ostream& operator<< | ( | std::ostream & | o, | |
const vhdVector3 & | v | |||
) | [friend] |
const vhdVector3 vhdVector3::ZERO [static] |
const vhdVector3 vhdVector3::UNIT_X [static] |
const vhdVector3 vhdVector3::UNIT_Y [static] |
const vhdVector3 vhdVector3::UNIT_Z [static] |
const vhdVector3 vhdVector3::UNIT_SCALE [static] |