#include <OgreVector2.h>
Public Member Functions | |
| Vector2 () | |
| Vector2 (Real fX, Real fY) | |
| Vector2 (Real afCoordinate[2]) | |
| Vector2 (int afCoordinate[2]) | |
| Vector2 (const Real *const r) | |
| Vector2 (const Vector2 &rkVector) | |
| Real | operator[] (size_t i) const |
| Real & | operator[] (size_t i) |
| Vector2 & | operator= (const Vector2 &rkVector) |
| Assigns the value of the other vector. | |
| bool | operator== (const Vector2 &rkVector) const |
| bool | operator!= (const Vector2 &rkVector) const |
| Vector2 | operator+ (const Vector2 &rkVector) const |
| Vector2 | operator- (const Vector2 &rkVector) const |
| Vector2 | operator * (Real fScalar) const |
| Vector2 | operator * (const Vector2 &rhs) const |
| Vector2 | operator/ (Real fScalar) const |
| Vector2 | operator- () const |
| Vector2 & | operator+= (const Vector2 &rkVector) |
| Vector2 & | operator-= (const Vector2 &rkVector) |
| Vector2 & | operator *= (Real fScalar) |
| Vector2 & | operator/= (Real fScalar) |
| Real | length () const |
| Returns the length (magnitude) of the vector. | |
| Real | squaredLength () const |
| Returns the square of the length(magnitude) of the vector. | |
| Real | dotProduct (const Vector2 &vec) const |
| Calculates the dot (scalar) product of this vector with another. | |
| Real | normalise () |
| Normalises the vector. | |
| Vector2 | midPoint (const Vector2 &vec) const |
| Returns a vector at a point half way between this and the passed in vector. | |
| bool | operator< (const Vector2 &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 Vector2 &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 Vector2 &cmp) |
| Sets this vector's components to the minimum of its own and the ones of the passed in vector. | |
| void | makeCeil (const Vector2 &cmp) |
| Sets this vector's components to the maximum of its own and the ones of the passed in vector. | |
| Vector2 | perpendicular (void) const |
| Generates a vector perpendicular to this vector (eg an 'up' vector). | |
| Vector2 | crossProduct (const Vector2 &rkVector) const |
| Calculates the cross-product of 2 vectors, i.e. | |
| Vector2 | randomDeviant (Real angle) const |
| Generates a new random vector which deviates from this vector by a given angle in a random direction. | |
| bool | isZeroLength (void) const |
| Returns true if this vector is zero length. | |
| Vector2 | normalisedCopy (void) const |
| As normalise, except that this vector is unaffected and the normalised vector is returned as a copy. | |
| Vector2 | reflect (const Vector2 &normal) const |
| Calculates a reflection vector to the plane with the given normal . | |
Static Public Attributes | |
| const Vector2 | ZERO |
| const Vector2 | UNIT_X |
| const Vector2 | UNIT_Y |
| const Vector2 | NEGATIVE_UNIT_X |
| const Vector2 | NEGATIVE_UNIT_Y |
| const Vector2 | UNIT_SCALE |
Friends | |
| Vector2 | operator * (Real fScalar, const Vector2 &rkVector) |
| _OgreExport friend std::ostream & | operator<< (std::ostream &o, const Vector2 &v) |
| Function for writing to a stream. | |
Definition at line 42 of file OgreVector2.h.
|
|
Definition at line 53 of file OgreVector2.h. |
|
||||||||||||
|
Definition at line 57 of file OgreVector2.h. References Ogre::Real. |
|
|
Definition at line 62 of file OgreVector2.h. References Ogre::Real. |
|
|
Definition at line 68 of file OgreVector2.h. References Ogre::Real. |
|
|
Definition at line 74 of file OgreVector2.h. References Ogre::Real. |
|
|
Definition at line 79 of file OgreVector2.h. |
|
|
Calculates the cross-product of 2 vectors, i.e. the vector that lies perpendicular to them both.
Definition at line 397 of file OgreVector2.h. |
|
|
Calculates the dot (scalar) product of this vector with another.
Definition at line 272 of file OgreVector2.h. References Ogre::Real, x, and y. |
|
|
Returns true if this vector is zero length.
Definition at line 432 of file OgreVector2.h. References Ogre::Real. |
|
|
Returns the length (magnitude) of the vector.
Definition at line 238 of file OgreVector2.h. References Ogre::Real. |
|
|
Sets this vector's components to the maximum of its own and the ones of the passed in vector.
Definition at line 353 of file OgreVector2.h. |
|
|
Sets this vector's components to the minimum of its own and the ones of the passed in vector.
Definition at line 340 of file OgreVector2.h. |
|
|
Returns a vector at a point half way between this and the passed in vector.
Definition at line 306 of file OgreVector2.h. |
|
|
Normalises the vector.
Definition at line 286 of file OgreVector2.h. References Ogre::Real. Referenced by normalisedCopy(). |
|
|
As normalise, except that this vector is unaffected and the normalised vector is returned as a copy.
Definition at line 441 of file OgreVector2.h. References normalise(). |
|
|
Definition at line 151 of file OgreVector2.h. |
|
|
Definition at line 141 of file OgreVector2.h. References Ogre::Real, x, and y. |
|
|
Definition at line 211 of file OgreVector2.h. References Ogre::Real. |
|
|
Definition at line 115 of file OgreVector2.h. |
|
|
Definition at line 121 of file OgreVector2.h. |
|
|
Definition at line 195 of file OgreVector2.h. |
|
|
Definition at line 174 of file OgreVector2.h. |
|
|
Definition at line 131 of file OgreVector2.h. |
|
|
Definition at line 203 of file OgreVector2.h. |
|
|
Definition at line 161 of file OgreVector2.h. References Ogre::Real, x, and y. |
|
|
Definition at line 219 of file OgreVector2.h. References Ogre::Real. |
|
|
Returns true if the vector's scalar components are all greater that the ones of the vector it is compared against.
Definition at line 316 of file OgreVector2.h. |
|
|
Assigns the value of the other vector.
Definition at line 102 of file OgreVector2.h. |
|
|
Definition at line 110 of file OgreVector2.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 326 of file OgreVector2.h. |
|
|
Definition at line 91 of file OgreVector2.h. References Ogre::Real. |
|
|
Definition at line 84 of file OgreVector2.h. References Ogre::Real. |
|
|
Generates a vector perpendicular to this vector (eg an 'up' vector).
Definition at line 366 of file OgreVector2.h. |
|
|
Generates a new random vector which deviates from this vector by a given angle in a random direction.
Definition at line 420 of file OgreVector2.h. References Ogre::Real. |
|
|
Calculates a reflection vector to the plane with the given normal .
Definition at line 451 of file OgreVector2.h. |
|
|
Returns the square of the length(magnitude) of the vector.
Definition at line 253 of file OgreVector2.h. References Ogre::Real. |
|
||||||||||||
|
Definition at line 184 of file OgreVector2.h. |
|
||||||||||||
|
Function for writing to a stream.
Definition at line 467 of file OgreVector2.h. |
|
|
Definition at line 460 of file OgreVector2.h. |
|
|
Definition at line 461 of file OgreVector2.h. |
|
|
Definition at line 462 of file OgreVector2.h. |
|
|
Definition at line 458 of file OgreVector2.h. |
|
|
Definition at line 459 of file OgreVector2.h. |
|
|
Definition at line 49 of file OgreVector2.h. |
|
|
Definition at line 47 of file OgreVector2.h. Referenced by crossProduct(), dotProduct(), makeCeil(), makeFloor(), midPoint(), operator *(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator<(), operator=(), operator==(), and operator>(). |
|
|
Definition at line 47 of file OgreVector2.h. Referenced by crossProduct(), dotProduct(), makeCeil(), makeFloor(), midPoint(), operator *(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator<(), operator=(), operator==(), and operator>(). |
|
|
Definition at line 457 of file OgreVector2.h. |
Copyright © 2000-2005 by The OGRE Team
Last modified Sun Nov 20 12:41:13 2005