OGRE: Ogre::VectorBase< 3, Real > Struct Reference

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::VectorBase< 3, Real > Struct Reference
Core » Math

`#include <OgreVector.h>`

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

## Public Attributes
Real | data [dims]
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

Referenced by absDotProduct(), crossProduct(), directionEquals(), getRotationTo(), midPoint(), perpendicular(), positionCloses(), primaryAxis(), and randomDeviant().

## ◆ VectorBase() [2/2]

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

References x, y, and z.

## Member Function Documentation

## ◆ ptr() [1/2]

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

References x.

## ◆ ptr() [2/2]

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

References x.

## ◆ 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.

This function work similar dotProduct, except it use absolute value of each component of the vector to computing.

Parameters

  vec | Vector with which to calculate the absolute dot product (together with this one).

Returns
  A Real representing the absolute dot product value.

References VectorBase(), Ogre::Math::Abs(), x, y, and z.

## Member Data Documentation

## ◆ x

Real Ogre::VectorBase< 3, Real >::x

Referenced by VectorBase(), absDotProduct(), crossProduct(), getRotationTo(), midPoint(), perpendicular(), primaryAxis(), ptr(), and ptr().

## ◆ y

Real Ogre::VectorBase< 3, Real >::y

Referenced by VectorBase(), absDotProduct(), crossProduct(), getRotationTo(), midPoint(), perpendicular(), and primaryAxis().

## ◆ z

Real Ogre::VectorBase< 3, Real >::z

Referenced by VectorBase(), absDotProduct(), crossProduct(), getRotationTo(), midPoint(), perpendicular(), and primaryAxis().

## ◆ ZERO

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

Referenced by randomDeviant().

## ◆ UNIT_X

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

Referenced by primaryAxis().

## ◆ UNIT_Y

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

Referenced by primaryAxis().

## ◆ UNIT_Z

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

Referenced by primaryAxis().

## ◆ NEGATIVE_UNIT_X

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

Referenced by primaryAxis().

## ◆ NEGATIVE_UNIT_Y

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

Referenced by primaryAxis().

## ◆ NEGATIVE_UNIT_Z

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

Referenced by primaryAxis().

## ◆ UNIT_SCALE

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

## ◆ data

Real Ogre::VectorBase< dims, Real >::data[dims]

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

- OgreVector.h