OGRE  1.12.8
Object-Oriented Graphics Rendering Engine
Ogre::VectorBase< 3, Real > Struct Reference

#include <OgreVector.h>

Public Member Functions

 VectorBase ()
 
 VectorBase (Real _x, Real _y, Real _z)
 
Real absDotProduct (const VectorBase &vec) const
 Calculates the absolute dot (scalar) product of this vector with another. More...
 
Vector3 crossProduct (const Vector3 &rkVector) const
 Calculates the cross-product of 2 vectors, i.e. More...
 
bool directionEquals (const Vector3 &rhs, const Radian &tolerance) const
 Returns whether this vector is within a directional tolerance of another vector. More...
 
Quaternion getRotationTo (const Vector3 &dest, const Vector3 &fallbackAxis=ZERO) const
 Gets the shortest arc quaternion to rotate this vector to the destination vector. More...
 
Vector3 midPoint (const Vector3 &vec) const
 Returns a vector at a point half way between this and the passed in vector. More...
 
Vector3operator= (const Real fScaler)
 
Vector3 perpendicular (void) const
 Generates a vector perpendicular to this vector (eg an 'up' vector). More...
 
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. More...
 
const Vector3primaryAxis () const
 Extract the primary (dominant) axis from this direction vector. More...
 
Realptr ()
 
const Realptr () const
 
Vector3 randomDeviant (const Radian &angle, const Vector3 &up=ZERO) 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
 
Real z
 

Static Public Attributes

static const Vector3 NEGATIVE_UNIT_X
 
static const Vector3 NEGATIVE_UNIT_Y
 
static const Vector3 NEGATIVE_UNIT_Z
 
static const Vector3 UNIT_SCALE
 
static const Vector3 UNIT_X
 
static const Vector3 UNIT_Y
 
static const Vector3 UNIT_Z
 
static const Vector3 ZERO
 

Constructor & Destructor Documentation

◆ VectorBase() [1/2]

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

◆ VectorBase() [2/2]

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

Member Function Documentation

◆ ptr() [1/2]

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

◆ ptr() [2/2]

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

◆ operator=()

Vector3& Ogre::VectorBase< 3, Real >::operator= ( const Real  fScaler)
inline

◆ absDotProduct()

Real Ogre::VectorBase< 3, Real >::absDotProduct ( const VectorBase< 3, Real > &  vec) const
inline

Calculates the absolute dot (scalar) product of this vector with another.

Remarks
This function work similar dotProduct, except it use absolute value of each component of the vector to computing.
Parameters
vecVector with which to calculate the absolute dot product (together with this one).
Returns
A Real representing the absolute dot product value.

References Ogre::Math::Abs().

Member Data Documentation

◆ x

◆ y

◆ z

◆ ZERO

const Vector3 Ogre::VectorBase< 3, Real >::ZERO
static

◆ UNIT_X

const Vector3 Ogre::VectorBase< 3, Real >::UNIT_X
static

◆ UNIT_Y

const Vector3 Ogre::VectorBase< 3, Real >::UNIT_Y
static

◆ UNIT_Z

const Vector3 Ogre::VectorBase< 3, Real >::UNIT_Z
static

◆ NEGATIVE_UNIT_X

const Vector3 Ogre::VectorBase< 3, Real >::NEGATIVE_UNIT_X
static

◆ NEGATIVE_UNIT_Y

const Vector3 Ogre::VectorBase< 3, Real >::NEGATIVE_UNIT_Y
static

◆ NEGATIVE_UNIT_Z

const Vector3 Ogre::VectorBase< 3, Real >::NEGATIVE_UNIT_Z
static

◆ UNIT_SCALE

const Vector3 Ogre::VectorBase< 3, Real >::UNIT_SCALE
static

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