OGRE  1.11.6
Object-Oriented Graphics Rendering Engine
Ogre::VectorBase< 2, Real > Struct Template Reference

#include <OgreVector.h>

Public Member Functions

 VectorBase ()
 
 VectorBase (Real _x, Real _y)
 
Radian angleTo (const Vector2 &other) const
 Gets the oriented angle between 2 vectors. More...
 
Real crossProduct (const VectorBase &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. More...
 
Vector2 midPoint (const Vector2 &vec) const
 Returns a vector at a point half way between this and the passed in vector. More...
 
Vector2 perpendicular (void) const
 Generates a vector perpendicular to this vector (eg an 'up' vector). More...
 
Realptr ()
 
const Realptr () const
 
Vector2 randomDeviant (Radian angle) const
 Generates a new random vector which deviates from this vector by a given angle in a random direction. More...
 

Public Attributes

Real x
 
Real y
 

Static Public Attributes

static const Vector2 NEGATIVE_UNIT_X
 
static const Vector2 NEGATIVE_UNIT_Y
 
static const Vector2 UNIT_SCALE
 
static const Vector2 UNIT_X
 
static const Vector2 UNIT_Y
 
static const Vector2 ZERO
 

Constructor & Destructor Documentation

◆ VectorBase() [1/2]

Ogre::VectorBase< 2, Real >::VectorBase ( )
inline

◆ VectorBase() [2/2]

Ogre::VectorBase< 2, Real >::VectorBase ( Real  _x,
Real  _y 
)
inline

Member Function Documentation

◆ ptr() [1/2]

Real* Ogre::VectorBase< 2, Real >::ptr ( )
inline

◆ ptr() [2/2]

const Real* Ogre::VectorBase< 2, Real >::ptr ( ) const
inline

◆ crossProduct()

Real Ogre::VectorBase< 2, Real >::crossProduct ( const VectorBase< 2, Real > &  rkVector) const
inline

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.

Member Data Documentation

◆ x

◆ y

◆ ZERO

const Vector2 Ogre::VectorBase< 2, Real >::ZERO
static

◆ UNIT_X

const Vector2 Ogre::VectorBase< 2, Real >::UNIT_X
static

◆ UNIT_Y

const Vector2 Ogre::VectorBase< 2, Real >::UNIT_Y
static

◆ NEGATIVE_UNIT_X

const Vector2 Ogre::VectorBase< 2, Real >::NEGATIVE_UNIT_X
static

◆ NEGATIVE_UNIT_Y

const Vector2 Ogre::VectorBase< 2, Real >::NEGATIVE_UNIT_Y
static

◆ UNIT_SCALE

const Vector2 Ogre::VectorBase< 2, Real >::UNIT_SCALE
static

The documentation for this struct was generated from the following file: