#include <OgreVector3.h>
Public Methods | |
Vector3 () | |
Vector3 (Real fX, Real fY, Real fZ) | |
Vector3 (Real afCoordinate[3]) | |
Vector3 (int afCoordinate[3]) | |
Vector3 (const Real *const r) | |
Vector3 (const Vector3 &rkVector) | |
Real | operator[] (unsigned i) const |
Real & | operator[] (unsigned i) |
Vector3 & | operator= (const Vector3 &rkVector) |
Assigns the value of the other vector. More... | |
bool | operator== (const Vector3 &rkVector) const |
bool | operator!= (const Vector3 &rkVector) const |
Vector3 | operator+ (const Vector3 &rkVector) const |
Vector3 | operator- (const Vector3 &rkVector) const |
Vector3 | operator * (Real fScalar) const |
Vector3 | operator * (const Vector3 &rhs) const |
Vector3 | operator/ (Real fScalar) const |
Vector3 | operator- () const |
Vector3 & | operator+= (const Vector3 &rkVector) |
Vector3 & | operator-= (const Vector3 &rkVector) |
Vector3 & | operator *= (Real fScalar) |
Vector3 & | operator/= (Real fScalar) |
Real | length () const |
Returns the length (magnitude) of the vector. More... | |
Real | squaredLength () const |
Returns the square of the length(magnitude) of the vector. More... | |
Real | dotProduct (const Vector3 &vec) const |
Calculates the dot (scalar) product of this vector with another. More... | |
Vector3 & | normalise () |
Normalises the vector. More... | |
Vector3 | crossProduct (const Vector3 &rkVector) const |
Calculates the cross-product of 2 vectors, i.e. More... | |
Vector3 | midPoint (const Vector3 &vec) const |
Returns a vector at a point half way between this and the passed in vector. More... | |
bool | operator< (const Vector3 &rhs) const |
Returns true if the vector's scalar components are all greater that the ones of the vector it is compared against. More... | |
bool | operator> (const Vector3 &rhs) const |
Returns true if the vector's scalar components are all smaller that the ones of the vector it is compared against. More... | |
void | makeFloor (const Vector3 &cmp) |
Sets this vector's components to the minimum of its own and the ones of the passed in vector. More... | |
void | makeCeil (const Vector3 &cmp) |
Sets this vector's components to the maximum of its own and the ones of the passed in vector. More... | |
Vector3 | perpendicular (void) |
Generates a vector perpendicular to this vector (eg an 'up' vector). More... | |
Vector3 | randomDeviant (Real angle, const Vector3 &up=Vector3::ZERO) |
Generates a new random vector which deviates from this vector by a given angle in a random direction. More... | |
Quaternion | getRotationTo (const Vector3 &dest) const |
Gets the shortest arc quaternion to rotate this vector to the destination vector. More... | |
Public Attributes | |
Real | x |
Real | y |
Real | z |
Static Public Attributes | |
const Vector3 | ZERO |
const Vector3 | UNIT_X |
const Vector3 | UNIT_Y |
const Vector3 | UNIT_Z |
const Vector3 | UNIT_SCALE |
Friends | |
Vector3 | operator * (Real fScalar, const Vector3 &rkVector) |
_OgreExport friend std::ostream & | operator<< (std::ostream &o, const Vector3 &v) |
Function for writing to a stream. More... |
|
|
|
|
|
|
|
|
|
|
|
|
|
Calculates the cross-product of 2 vectors, i.e. the vector that lies perpendicular to them both.
For a clearer explanation, look a the left and the bottom edges of your monitor's screen. Assume that the first vector is the left edge and the second vector is the bottom edge, both of them starting from the lower-left corner of the screen. The resulting vector is going to be perpendicular to both of them and will go inside the screen, towards the cathode tube (assuming you're using a CRT monitor, of course). |
|
Calculates the dot (scalar) product of this vector with another.
|
|
Gets the shortest arc quaternion to rotate this vector to the destination vector.
|
|
Returns the length (magnitude) of the vector.
|
|
Sets this vector's components to the maximum of its own and the ones of the passed in vector.
|
|
Sets this vector's components to the minimum of its own and the ones of the passed in vector.
|
|
Returns a vector at a point half way between this and the passed in vector.
|
|
Normalises the vector.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns true if the vector's scalar components are all greater that the ones of the vector it is compared against.
|
|
Assigns the value of the other vector.
|
|
|
|
Returns true if the vector's scalar components are all smaller that the ones of the vector it is compared against.
|
|
|
|
|
|
Generates a vector perpendicular to this vector (eg an 'up' vector).
|
|
Generates a new random vector which deviates from this vector by a given angle in a random direction.
|
|
Returns the square of the length(magnitude) of the vector.
|
|
|
|
Function for writing to a stream.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Copyright © 2002 by The OGRE Team