#include <OgreVector2.h>
Public Member Functions | |
Vector2 () | |
Vector2 (const Real fX, const Real fY) | |
Vector2 (const Real scaler) | |
Vector2 (const Real afCoordinate[2]) | |
Vector2 (const int afCoordinate[2]) | |
Vector2 (Real *const r) | |
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. | |
Vector2 & | operator= (const Vector2 &rkVector) |
Assigns the value of the other vector. | |
Vector2 & | operator= (const Real fScalar) |
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 * (const Real fScalar) const |
Vector2 | operator * (const Vector2 &rhs) const |
Vector2 | operator/ (const Real fScalar) const |
Vector2 | operator/ (const Vector2 &rhs) const |
const Vector2 & | operator+ () const |
Vector2 | operator- () const |
Vector2 & | operator+= (const Vector2 &rkVector) |
Vector2 & | operator+= (const Real fScaler) |
Vector2 & | operator-= (const Vector2 &rkVector) |
Vector2 & | operator-= (const Real fScaler) |
Vector2 & | operator *= (const Real fScalar) |
Vector2 & | operator *= (const Vector2 &rkVector) |
Vector2 & | operator/= (const Real fScalar) |
Vector2 & | operator/= (const Vector2 &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 | 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). | |
Real | crossProduct (const Vector2 &rkVector) const |
Calculates the 2 dimensional cross-product of 2 vectors, which results in a single floating point value which is 2 times the area of the triangle. | |
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 . | |
Public Attributes | |
Real | x |
Real | y |
Static Public Attributes | |
static const Vector2 | ZERO |
static const Vector2 | UNIT_X |
static const Vector2 | UNIT_Y |
static const Vector2 | NEGATIVE_UNIT_X |
static const Vector2 | NEGATIVE_UNIT_Y |
static const Vector2 | UNIT_SCALE |
Friends | |
Vector2 | operator * (const Real fScalar, const Vector2 &rkVector) |
Vector2 | operator/ (const Real fScalar, const Vector2 &rkVector) |
Vector2 | operator+ (const Vector2 &lhs, const Real rhs) |
Vector2 | operator+ (const Real lhs, const Vector2 &rhs) |
Vector2 | operator- (const Vector2 &lhs, const Real rhs) |
Vector2 | operator- (const Real lhs, const Vector2 &rhs) |
_OgreExport friend std::ostream & | operator<< (std::ostream &o, const Vector2 &v) |
Function for writing to a stream. |
Definition at line 46 of file OgreVector2.h.
|
Definition at line 52 of file OgreVector2.h. |
|
Definition at line 56 of file OgreVector2.h. |
|
Definition at line 61 of file OgreVector2.h. |
|
Definition at line 66 of file OgreVector2.h. |
|
Definition at line 72 of file OgreVector2.h. |
|
Definition at line 78 of file OgreVector2.h. |
|
Calculates the 2 dimensional cross-product of 2 vectors, which results in a single floating point value which is 2 times the area of the triangle.
Definition at line 448 of file OgreVector2.h. |
|
Calculates the dot (scalar) product of this vector with another.
Definition at line 347 of file OgreVector2.h. |
|
Returns true if this vector is zero length.
Definition at line 483 of file OgreVector2.h. |
|
Returns the length (magnitude) of the vector.
Definition at line 313 of file OgreVector2.h. References Ogre::Math::Sqrt(). |
|
Sets this vector's components to the maximum of its own and the ones of the passed in vector.
Definition at line 428 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 415 of file OgreVector2.h. |
|
Returns a vector at a point half way between this and the passed in vector.
Definition at line 381 of file OgreVector2.h. |
|
Normalises the vector.
Definition at line 361 of file OgreVector2.h. References Ogre::Math::Sqrt(). Referenced by normalisedCopy(). |
|
As normalise, except that this vector is unaffected and the normalised vector is returned as a copy.
Definition at line 492 of file OgreVector2.h. References normalise(). |
|
Definition at line 160 of file OgreVector2.h. |
|
Definition at line 153 of file OgreVector2.h. |
|
Definition at line 278 of file OgreVector2.h. |
|
Definition at line 270 of file OgreVector2.h. |
|
Definition at line 133 of file OgreVector2.h. |
|
Definition at line 185 of file OgreVector2.h. |
|
Definition at line 139 of file OgreVector2.h. |
|
Definition at line 246 of file OgreVector2.h. |
|
Definition at line 238 of file OgreVector2.h. |
|
Definition at line 190 of file OgreVector2.h. |
|
Definition at line 146 of file OgreVector2.h. |
|
Definition at line 262 of file OgreVector2.h. |
|
Definition at line 254 of file OgreVector2.h. |
|
Definition at line 178 of file OgreVector2.h. |
|
Definition at line 167 of file OgreVector2.h. |
|
Definition at line 298 of file OgreVector2.h. |
|
Definition at line 286 of file OgreVector2.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 391 of file OgreVector2.h. |
|
Definition at line 120 of file OgreVector2.h. |
|
Assigns the value of the other vector.
Definition at line 112 of file OgreVector2.h. |
|
Definition at line 128 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 401 of file OgreVector2.h. |
|
Definition at line 90 of file OgreVector2.h. |
|
Definition at line 83 of file OgreVector2.h. |
|
Generates a vector perpendicular to this vector (eg an 'up' vector).
Definition at line 441 of file OgreVector2.h. |
|
Pointer accessor for direct copying.
Definition at line 103 of file OgreVector2.h. |
|
Pointer accessor for direct copying.
Definition at line 98 of file OgreVector2.h. Referenced by Ogre::AnimableValue::setAsBaseValue(). |
|
Generates a new random vector which deviates from this vector by a given angle in a random direction.
Definition at line 471 of file OgreVector2.h. References Ogre::Math::TWO_PI, and Ogre::Math::UnitRandom(). |
|
Calculates a reflection vector to the plane with the given normal .
Definition at line 502 of file OgreVector2.h. |
|
Returns the square of the length(magnitude) of the vector.
Definition at line 328 of file OgreVector2.h. |
|
Definition at line 196 of file OgreVector2.h. |
|
Definition at line 217 of file OgreVector2.h. |
|
Definition at line 210 of file OgreVector2.h. |
|
Definition at line 231 of file OgreVector2.h. |
|
Definition at line 224 of file OgreVector2.h. |
|
Definition at line 203 of file OgreVector2.h. |
|
Function for writing to a stream.
Definition at line 518 of file OgreVector2.h. |
|
Definition at line 511 of file OgreVector2.h. |
|
Definition at line 512 of file OgreVector2.h. |
|
Definition at line 513 of file OgreVector2.h. |
|
Definition at line 509 of file OgreVector2.h. |
|
Definition at line 510 of file OgreVector2.h. |
|
Definition at line 49 of file OgreVector2.h. Referenced by crossProduct(), dotProduct(), makeCeil(), makeFloor(), midPoint(), operator *(), operator *=(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), operator=(), operator==(), and operator>(). |
|
Definition at line 49 of file OgreVector2.h. Referenced by crossProduct(), dotProduct(), makeCeil(), makeFloor(), midPoint(), operator *(), operator *=(), operator!=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), operator=(), operator==(), and operator>(). |
|
Definition at line 508 of file OgreVector2.h. |
Copyright © 2008 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sat Apr 11 13:56:27 2009