#include <OgreVector3.h>
Public Member Functions | |
Vector3 () | |
Vector3 (const Real fX, const Real fY, const Real fZ) | |
Vector3 (const Real afCoordinate[3]) | |
Vector3 (const int afCoordinate[3]) | |
Vector3 (Real *const r) | |
Vector3 (const Real scaler) | |
Vector3 (const Vector3 &rkVector) | |
Real | operator[] (const size_t i) const |
Real & | operator[] (const size_t i) |
Real * | ptr () |
Pointer accessor for direct copying. | |
const Real * | ptr () const |
Pointer accessor for direct copying. | |
Vector3 & | operator= (const Vector3 &rkVector) |
Assigns the value of the other vector. | |
Vector3 & | operator= (const Real fScaler) |
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 * (const Real fScalar) const |
Vector3 | operator * (const Vector3 &rhs) const |
Vector3 | operator/ (const Real fScalar) const |
Vector3 | operator/ (const Vector3 &rhs) const |
const Vector3 & | operator+ () const |
Vector3 | operator- () const |
Vector3 & | operator+= (const Vector3 &rkVector) |
Vector3 & | operator+= (const Real fScalar) |
Vector3 & | operator-= (const Vector3 &rkVector) |
Vector3 & | operator-= (const Real fScalar) |
Vector3 & | operator *= (const Real fScalar) |
Vector3 & | operator *= (const Vector3 &rkVector) |
Vector3 & | operator/= (const Real fScalar) |
Vector3 & | operator/= (const Vector3 &rkVector) |
Real | length () const |
Returns the length (magnitude) of the vector. | |
Real | squaredLength () const |
Returns the square of the length(magnitude) of the vector. | |
Real | distance (const Vector3 &rhs) const |
Returns the distance to another vector. | |
Real | squaredDistance (const Vector3 &rhs) const |
Returns the square of the distance to another vector. | |
Real | dotProduct (const Vector3 &vec) const |
Calculates the dot (scalar) product of this vector with another. | |
Real | absDotProduct (const Vector3 &vec) const |
Calculates the absolute dot (scalar) product of this vector with another. | |
Real | normalise () |
Normalises the vector. | |
Vector3 | crossProduct (const Vector3 &rkVector) const |
Calculates the cross-product of 2 vectors, i.e. | |
Vector3 | midPoint (const Vector3 &vec) const |
Returns a vector at a point half way between this and the passed in vector. | |
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. | |
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. | |
void | makeFloor (const Vector3 &cmp) |
Sets this vector's components to the minimum of its own and the ones of the passed in vector. | |
void | makeCeil (const Vector3 &cmp) |
Sets this vector's components to the maximum of its own and the ones of the passed in vector. | |
Vector3 | perpendicular (void) const |
Generates a vector perpendicular to this vector (eg an 'up' vector). | |
Vector3 | randomDeviant (const Radian &angle, const Vector3 &up=Vector3::ZERO) const |
Generates a new random vector which deviates from this vector by a given angle in a random direction. | |
Quaternion | getRotationTo (const Vector3 &dest, const Vector3 &fallbackAxis=Vector3::ZERO) const |
Gets the shortest arc quaternion to rotate this vector to the destination vector. | |
bool | isZeroLength (void) const |
Returns true if this vector is zero length. | |
Vector3 | normalisedCopy (void) const |
As normalise, except that this vector is unaffected and the normalised vector is returned as a copy. | |
Vector3 | reflect (const Vector3 &normal) const |
Calculates a reflection vector to the plane with the given normal . | |
bool | positionEquals (const Vector3 &rhs, Real tolerance=1e-03) const |
Returns whether this vector is within a positional tolerance of another vector. | |
bool | positionCloses (const Vector3 &rhs, Real tolerance=1e-03f) const |
Returns whether this vector is within a positional tolerance of another vector, also take scale of the vectors into account. | |
bool | directionEquals (const Vector3 &rhs, const Radian &tolerance) const |
Returns whether this vector is within a directional tolerance of another vector. | |
Public Attributes | |
Real | x |
Real | y |
Real | z |
Static Public Attributes | |
static const Vector3 | ZERO |
static const Vector3 | UNIT_X |
static const Vector3 | UNIT_Y |
static const Vector3 | UNIT_Z |
static const Vector3 | NEGATIVE_UNIT_X |
static const Vector3 | NEGATIVE_UNIT_Y |
static const Vector3 | NEGATIVE_UNIT_Z |
static const Vector3 | UNIT_SCALE |
Friends | |
Vector3 | operator * (const Real fScalar, const Vector3 &rkVector) |
Vector3 | operator/ (const Real fScalar, const Vector3 &rkVector) |
Vector3 | operator+ (const Vector3 &lhs, const Real rhs) |
Vector3 | operator+ (const Real lhs, const Vector3 &rhs) |
Vector3 | operator- (const Vector3 &lhs, const Real rhs) |
Vector3 | operator- (const Real lhs, const Vector3 &rhs) |
_OgreExport friend std::ostream & | operator<< (std::ostream &o, const Vector3 &v) |
Function for writing to a stream. |
Definition at line 46 of file OgreVector3.h.
|
Definition at line 52 of file OgreVector3.h. |
|
Definition at line 56 of file OgreVector3.h. |
|
Definition at line 61 of file OgreVector3.h. |
|
Definition at line 68 of file OgreVector3.h. |
|
Definition at line 75 of file OgreVector3.h. |
|
Definition at line 80 of file OgreVector3.h. |
|
Definition at line 88 of file OgreVector3.h. |
|
Calculates the absolute dot (scalar) product of this vector with another.
Definition at line 419 of file OgreVector3.h. |
|
Calculates the cross-product of 2 vectors, i.e. the vector that lies perpendicular to them both.
Definition at line 477 of file OgreVector3.h. Referenced by getRotationTo(). |
|
Returns whether this vector is within a directional tolerance of another vector.
Definition at line 737 of file OgreVector3.h. References Ogre::Radian::valueRadians(). |
|
Returns the distance to another vector.
Definition at line 370 of file OgreVector3.h. References Ogre::UTFString::length(). |
|
Calculates the dot (scalar) product of this vector with another.
Definition at line 404 of file OgreVector3.h. Referenced by getRotationTo(). |
|
Gets the shortest arc quaternion to rotate this vector to the destination vector.
Definition at line 629 of file OgreVector3.h. References crossProduct(), dotProduct(), Ogre::Quaternion::FromAngleAxis(), isZeroLength(), Ogre::Quaternion::normalise(), normalise(), Ogre::Quaternion::w, x, Ogre::Quaternion::x, y, Ogre::Quaternion::y, z, and Ogre::Quaternion::z. |
|
Returns true if this vector is zero length.
Definition at line 680 of file OgreVector3.h. Referenced by getRotationTo(). |
|
Returns the length (magnitude) of the vector.
Definition at line 343 of file OgreVector3.h. |
|
Sets this vector's components to the maximum of its own and the ones of the passed in vector.
Definition at line 537 of file OgreVector3.h. Referenced by Ogre::AxisAlignedBox::intersection(), and Ogre::AxisAlignedBox::merge(). |
|
Sets this vector's components to the minimum of its own and the ones of the passed in vector.
Definition at line 523 of file OgreVector3.h. Referenced by Ogre::AxisAlignedBox::intersection(), and Ogre::AxisAlignedBox::merge(). |
|
Returns a vector at a point half way between this and the passed in vector.
Definition at line 488 of file OgreVector3.h. |
|
Normalises the vector.
Definition at line 433 of file OgreVector3.h. Referenced by getRotationTo(), normalisedCopy(), and Ogre::Matrix4::operator *(). |
|
As normalise, except that this vector is unaffected and the normalised vector is returned as a copy.
Definition at line 689 of file OgreVector3.h. References normalise(). |
|
Definition at line 174 of file OgreVector3.h. |
|
Definition at line 166 of file OgreVector3.h. |
|
Definition at line 304 of file OgreVector3.h. |
|
Definition at line 296 of file OgreVector3.h. |
|
Definition at line 144 of file OgreVector3.h. |
|
Definition at line 202 of file OgreVector3.h. |
|
Definition at line 150 of file OgreVector3.h. |
|
Definition at line 271 of file OgreVector3.h. |
|
Definition at line 262 of file OgreVector3.h. |
|
Definition at line 207 of file OgreVector3.h. |
|
Definition at line 158 of file OgreVector3.h. |
|
Definition at line 288 of file OgreVector3.h. |
|
Definition at line 279 of file OgreVector3.h. |
|
Definition at line 194 of file OgreVector3.h. |
|
Definition at line 182 of file OgreVector3.h. |
|
Definition at line 326 of file OgreVector3.h. |
|
Definition at line 313 of file OgreVector3.h. |
|
Returns true if the vector's scalar components are all greater that the ones of the vector it is compared against.
Definition at line 499 of file OgreVector3.h. |
|
Definition at line 130 of file OgreVector3.h. |
|
Assigns the value of the other vector.
Definition at line 121 of file OgreVector3.h. |
|
Definition at line 139 of file OgreVector3.h. |
|
Returns true if the vector's scalar components are all smaller that the ones of the vector it is compared against.
Definition at line 509 of file OgreVector3.h. |
|
Definition at line 100 of file OgreVector3.h. |
|
Definition at line 93 of file OgreVector3.h. |
|
Generates a vector perpendicular to this vector (eg an 'up' vector).
Definition at line 551 of file OgreVector3.h. References squaredLength(). |
|
Returns whether this vector is within a positional tolerance of another vector, also take scale of the vectors into account.
Definition at line 724 of file OgreVector3.h. |
|
Returns whether this vector is within a positional tolerance of another vector.
Definition at line 710 of file OgreVector3.h. |
|
Pointer accessor for direct copying.
Definition at line 112 of file OgreVector3.h. |
|
Pointer accessor for direct copying.
Definition at line 107 of file OgreVector3.h. |
|
Generates a new random vector which deviates from this vector by a given angle in a random direction.
Definition at line 587 of file OgreVector3.h. References Ogre::Quaternion::FromAngleAxis(). |
|
Calculates a reflection vector to the plane with the given normal .
Definition at line 699 of file OgreVector3.h. |
|
Returns the square of the distance to another vector.
Definition at line 385 of file OgreVector3.h. |
|
Returns the square of the length(magnitude) of the vector.
Definition at line 358 of file OgreVector3.h. Referenced by perpendicular(). |
|
Definition at line 213 of file OgreVector3.h. |
|
Definition at line 237 of file OgreVector3.h. |
|
Definition at line 229 of file OgreVector3.h. |
|
Definition at line 253 of file OgreVector3.h. |
|
Definition at line 245 of file OgreVector3.h. |
|
Definition at line 221 of file OgreVector3.h. |
|
Function for writing to a stream.
Definition at line 760 of file OgreVector3.h. |
|
Definition at line 752 of file OgreVector3.h. |
|
Definition at line 753 of file OgreVector3.h. |
|
Definition at line 754 of file OgreVector3.h. |
|
Definition at line 755 of file OgreVector3.h. |
|
Definition at line 749 of file OgreVector3.h. |
|
Definition at line 750 of file OgreVector3.h. |
|
Definition at line 751 of file OgreVector3.h. |
|
Definition at line 49 of file OgreVector3.h. Referenced by Ogre::AxisAlignedBox::contains(), getRotationTo(), Ogre::AxisAlignedBox::intersection(), Ogre::Matrix4::operator *(), Ogre::AxisAlignedBox::transform(), Ogre::AxisAlignedBox::transformAffine(), and Ogre::AxisAlignedBox::volume(). |
|
Definition at line 49 of file OgreVector3.h. Referenced by Ogre::AxisAlignedBox::contains(), getRotationTo(), Ogre::AxisAlignedBox::intersection(), Ogre::Matrix4::operator *(), Ogre::AxisAlignedBox::transform(), Ogre::AxisAlignedBox::transformAffine(), and Ogre::AxisAlignedBox::volume(). |
|
Definition at line 49 of file OgreVector3.h. Referenced by Ogre::AxisAlignedBox::contains(), getRotationTo(), Ogre::AxisAlignedBox::intersection(), Ogre::Matrix4::operator *(), Ogre::AxisAlignedBox::transform(), Ogre::AxisAlignedBox::transformAffine(), and Ogre::AxisAlignedBox::volume(). |
|
Definition at line 748 of file OgreVector3.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun May 6 10:59:57 2007