OGRE-Next: Ogre::ArrayQuaternion Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::ArrayQuaternion Class Reference
Core » Math

Cache-friendly array of Quaternion represented as a SoA array. More...

`#include <OgreArrayQuaternion.h>`

## Public Member Functions
| ArrayQuaternion ()
| ArrayQuaternion ()
| ArrayQuaternion ()
| ArrayQuaternion (const ArrayReal &chunkW, const ArrayReal &chunkX, const ArrayReal &chunkY, const ArrayReal &chunkZ)
| ArrayQuaternion (const ArrayReal &chunkW, const ArrayReal &chunkX, const ArrayReal &chunkY, const ArrayReal &chunkZ)
| ArrayQuaternion (const ArrayReal &chunkW, const ArrayReal &chunkX, const ArrayReal &chunkY, const ArrayReal &chunkZ)
void | Cmov4 (ArrayMaskR mask, const ArrayQuaternion &replacement)
| Conditional move update.
void | Cmov4 (ArrayMaskR mask, const ArrayQuaternion &replacement)
| Conditional move update.
void | Cmov4 (ArrayMaskR mask, const ArrayQuaternion &replacement)
| Conditional move update.
ArrayReal | Dot (const ArrayQuaternion &rkQ) const
| Returns the dot product of the quaternion.
ArrayReal | Dot (const ArrayQuaternion &rkQ) const
| Returns the dot product of the quaternion.
ArrayReal | Dot (const ArrayQuaternion &rkQ) const
| Returns the dot product of the quaternion.
ArrayQuaternion | Exp () const
ArrayQuaternion | Exp () const
ArrayQuaternion | Exp () const
void | FromAngleAxis (const ArrayRadian &rfAngle, const ArrayVector3 &rkAxis)
| Setups the quaternion using the supplied vector, and "roll" around that vector by the specified radians.
void | FromAngleAxis (const ArrayRadian &rfAngle, const ArrayVector3 &rkAxis)
| Setups the quaternion using the supplied vector, and "roll" around that vector by the specified radians.
void | FromAngleAxis (const ArrayRadian &rfAngle, const ArrayVector3 &rkAxis)
| Setups the quaternion using the supplied vector, and "roll" around that vector by the specified radians.
void | FromOrthoDet1RotationMatrix (const ArrayReal *RESTRICT_ALIAS matrix)
void | FromOrthoDet1RotationMatrix (const ArrayReal *RESTRICT_ALIAS matrix)
void | FromOrthoDet1RotationMatrix (const ArrayReal *RESTRICT_ALIAS matrix)
void | getAsQuaternion (Quaternion &out, size_t index) const
void | getAsQuaternion (Quaternion &out, size_t index) const
void | getAsQuaternion (Quaternion &out, size_t index) const
Quaternion | getAsQuaternion (size_t index) const
| Prefer using.
Quaternion | getAsQuaternion (size_t index) const
| Prefer using.
Quaternion | getAsQuaternion (size_t index) const
| Prefer using.
ArrayQuaternion | Inverse () const
ArrayQuaternion | Inverse () const
ArrayQuaternion | Inverse () const
ArrayQuaternion | Log () const
ArrayQuaternion | Log () const
ArrayQuaternion | Log () const
ArrayReal | Norm () const
ArrayReal | Norm () const
ArrayReal | Norm () const
void | normalise ()
| Unlike Quaternion::normalise(), this function does not return the length of the vector because such value was not cached and was never available.
void | normalise ()
| Unlike Quaternion::normalise(), this function does not return the length of the vector because such value was not cached and was never available.
void | normalise ()
| Unlike Quaternion::normalise(), this function does not return the length of the vector because such value was not cached and was never available.
ArrayVector3 | operator* (const ArrayVector3 &v) const
| Rotation of a vector by a quaternion.
ArrayVector3 | operator* (const ArrayVector3 &v) const
| Rotation of a vector by a quaternion.
ArrayVector3 | operator* (const ArrayVector3 &v) const
| Rotation of a vector by a quaternion.
void | operator*= (const ArrayReal fScalar)
void | operator*= (const ArrayReal fScalar)
void | operator*= (const ArrayReal fScalar)
void | operator+= (const ArrayQuaternion &a)
void | operator+= (const ArrayQuaternion &a)
void | operator+= (const ArrayQuaternion &a)
void | operator-= (const ArrayQuaternion &a)
void | operator-= (const ArrayQuaternion &a)
void | operator-= (const ArrayQuaternion &a)
void | setAll (const Quaternion &v)
void | setAll (const Quaternion &v)
void | setAll (const Quaternion &v)
void | setFromQuaternion (const Quaternion &v, size_t index)
void | setFromQuaternion (const Quaternion &v, size_t index)
void | setFromQuaternion (const Quaternion &v, size_t index)
void | ToAngleAxis (ArrayRadian &rfAngle, ArrayVector3 &rkAxis) const
void | ToAngleAxis (ArrayRadian &rfAngle, ArrayVector3 &rkAxis) const
void | ToAngleAxis (ArrayRadian &rfAngle, ArrayVector3 &rkAxis) const
ArrayQuaternion | UnitInverse () const
ArrayQuaternion | UnitInverse () const
ArrayQuaternion | UnitInverse () const
ArrayVector3 | xAxis () const
| Returns the X orthonormal axis defining the quaternion.
ArrayVector3 | xAxis () const
| Returns the X orthonormal axis defining the quaternion.
ArrayVector3 | xAxis () const
| Returns the X orthonormal axis defining the quaternion.
ArrayVector3 | yAxis () const
| Returns the Y orthonormal axis defining the quaternion.
ArrayVector3 | yAxis () const
| Returns the Y orthonormal axis defining the quaternion.
ArrayVector3 | yAxis () const
| Returns the Y orthonormal axis defining the quaternion.
ArrayVector3 | zAxis () const
| Returns the Z orthonormal axis defining the quaternion.
ArrayVector3 | zAxis () const
| Returns the Z orthonormal axis defining the quaternion.
ArrayVector3 | zAxis () const
| Returns the Z orthonormal axis defining the quaternion.

## Static Public Member Functions
static ArrayQuaternion | Cmov4 (const ArrayQuaternion &arg1, const ArrayQuaternion &arg2, ArrayMaskR mask)
| Conditional move.
static ArrayQuaternion | Cmov4 (const ArrayQuaternion &arg1, const ArrayQuaternion &arg2, ArrayMaskR mask)
| Conditional move.
static ArrayQuaternion | Cmov4 (const ArrayQuaternion &arg1, const ArrayQuaternion &arg2, ArrayMaskR mask)
| Conditional move.
static void | mul (const ArrayQuaternion &inQ, ArrayVector3 &inOutVec)
| Rotates a vector by multiplying the quaternion to the vector, and modifies it's contents by storing the results there.
static void | mul (const ArrayQuaternion &inQ, ArrayVector3 &inOutVec)
| Rotates a vector by multiplying the quaternion to the vector, and modifies it's contents by storing the results there.
static void | mul (const ArrayQuaternion &inQ, ArrayVector3 &inOutVec)
| Rotates a vector by multiplying the quaternion to the vector, and modifies it's contents by storing the results there.
static ArrayQuaternion | nlerp (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
static ArrayQuaternion | nlerp (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
static ArrayQuaternion | nlerp (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
static ArrayQuaternion | nlerpShortest (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
static ArrayQuaternion | nlerpShortest (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
static ArrayQuaternion | nlerpShortest (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
static ArrayQuaternion | Slerp (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
static ArrayQuaternion | Slerp (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
static ArrayQuaternion | Slerp (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)

## Public Attributes
ArrayReal | mChunkBase [4]
Real | w
Real | x
Real | y
Real | z

## Static Public Attributes
static const ArrayQuaternion | IDENTITY
static const ArrayQuaternion | ZERO

## Detailed Description

Cache-friendly array of Quaternion represented as a SoA array.

Remarks
  ArrayQuaternion is a SIMD & cache-friendly version of Quaternion. An operation on an ArrayQuaternion is done on 4 quaternions at a time (the actual amount is defined by ARRAY_PACKED_REALS) Assuming ARRAY_PACKED_REALS == 4, the memory layout will be as following: mChunkBase mChunkBase + 4 WWWW XXXX YYYY ZZZZ WWWW XXXX YYYY ZZZZ Extracting one quat (XYZW) needs 64 bytes, which is within the 64 byte size of common cache lines. Architectures where the cache line == 32 bytes may want to set ARRAY_PACKED_REALS = 2 depending on their needs

## Constructor & Destructor Documentation

## ◆ ArrayQuaternion() [1/6]

Ogre::ArrayQuaternion::ArrayQuaternion | ( |  | ) |
| inline

Referenced by Cmov4(), Cmov4(), Dot(), Exp(), Inverse(), Log(), mul(), nlerp(), nlerpShortest(), operator*, operator*, operator*, operator+, operator+=(), operator-, operator-=(), Slerp(), and UnitInverse().

## ◆ ArrayQuaternion() [2/6]

Ogre::ArrayQuaternion::ArrayQuaternion | ( | const ArrayReal & | chunkW,
|  | const ArrayReal & | chunkX,
|  | const ArrayReal & | chunkY,
|  | const ArrayReal & | chunkZ )
| inline

References w, x, y, and z.

## ◆ ArrayQuaternion() [3/6]

Ogre::ArrayQuaternion::ArrayQuaternion | ( |  | ) |
| inline

## ◆ ArrayQuaternion() [4/6]

Ogre::ArrayQuaternion::ArrayQuaternion | ( | const ArrayReal & | chunkW,
|  | const ArrayReal & | chunkX,
|  | const ArrayReal & | chunkY,
|  | const ArrayReal & | chunkZ )
| inline

References mChunkBase.

## ◆ ArrayQuaternion() [5/6]

Ogre::ArrayQuaternion::ArrayQuaternion | ( |  | ) |
| inline

## ◆ ArrayQuaternion() [6/6]

Ogre::ArrayQuaternion::ArrayQuaternion | ( | const ArrayReal & | chunkW,
|  | const ArrayReal & | chunkX,
|  | const ArrayReal & | chunkY,
|  | const ArrayReal & | chunkZ )
| inline

References mChunkBase.

## Member Function Documentation

## ◆ Cmov4() [1/6]

void Ogre::ArrayQuaternion::Cmov4 | ( | ArrayMaskR | mask,
|  | const ArrayQuaternion & | replacement )
| inline

Conditional move update.

Changes each of the four vectors contained in 'this' with the replacement provided:

this[i] = mask[i] != 0 ? this[i] : replacement[i]

See also
  MathlibC::Cmov4

Remarks
  If mask param contains anything other than 0's or 0xffffffff's the result is undefined. Use this version if you want to decide whether to keep current result or overwrite with a replacement (performance optimization). i.e. a = Cmov4( a, b ) If this vector hasn't been assigned yet any value and want to decide between two ArrayQuaternions, i.e. a = Cmov4( b, c ) then see Cmov4( const ArrayQuaternion &arg1, const ArrayQuaternion &arg2, ArrayMaskR mask ); instead.

Parameters

  replacement | Vectors to be used as replacement if the mask is zero.
  mask | mask filled with either 0's or 0xFFFFFFFF

References ArrayQuaternion().

## ◆ Cmov4() [2/6]

void Ogre::ArrayQuaternion::Cmov4 | ( | ArrayMaskR | mask,
|  | const ArrayQuaternion & | replacement )
| inline

Conditional move update.

Changes each of the four vectors contained in 'this' with the replacement provided:

this[i] = mask[i] != 0 ? this[i] : replacement[i]

See also
  MathlibNEON::Cmov4

Remarks
  If mask param contains anything other than 0's or 0xffffffff's the result is undefined. Use this version if you want to decide whether to keep current result or overwrite with a replacement (performance optimization). i.e. a = Cmov4( a, b ) If this vector hasn't been assigned yet any value and want to decide between two ArrayQuaternions, i.e. a = Cmov4( b, c ) then see Cmov4( const ArrayQuaternion &arg1, const ArrayQuaternion &arg2, ArrayMaskR mask ); instead.

Parameters

  replacement | Vectors to be used as replacement if the mask is zero.
  mask | mask filled with either 0's or 0xFFFFFFFF

References ArrayQuaternion().

## ◆ Cmov4() [3/6]

void Ogre::ArrayQuaternion::Cmov4 | ( | ArrayMaskR | mask,
|  | const ArrayQuaternion & | replacement )
| inline

Conditional move update.

Changes each of the four vectors contained in 'this' with the replacement provided:

this[i] = mask[i] != 0 ? this[i] : replacement[i]

See also
  MathlibSSE2::Cmov4

Remarks
  If mask param contains anything other than 0's or 0xffffffff's the result is undefined. Use this version if you want to decide whether to keep current result or overwrite with a replacement (performance optimization). i.e. a = Cmov4( a, b ) If this vector hasn't been assigned yet any value and want to decide between two ArrayQuaternions, i.e. a = Cmov4( b, c ) then see Cmov4( const ArrayQuaternion &arg1, const ArrayQuaternion &arg2, ArrayMaskR mask ); instead.

Parameters

  replacement | Vectors to be used as replacement if the mask is zero.
  mask | mask filled with either 0's or 0xFFFFFFFF

References ArrayQuaternion().

## ◆ Cmov4() [4/6]

ArrayQuaternion Ogre::ArrayQuaternion::Cmov4 | ( | const ArrayQuaternion & | arg1,
|  | const ArrayQuaternion & | arg2,
|  | ArrayMaskR | mask )
| inlinestatic

Conditional move.

Selects between arg1 & arg2 according to mask:

this[i] = mask[i] != 0 ? arg1[i] : arg2[i]

See also
  MathlibC::Cmov4

Remarks
  If mask param contains anything other than 0's or 0xffffffff's the result is undefined. If you wanted to do a = cmov4( a, b ), then consider using the update version see Cmov4( ArrayMaskR mask, const ArrayQuaternion &replacement ); instead.

Parameters

  arg1 | First array of Vectors
  arg2 | Second array of Vectors
  mask | mask filled with either 0's or 0xFFFFFFFF

References ArrayQuaternion().

## ◆ Cmov4() [5/6]

ArrayQuaternion Ogre::ArrayQuaternion::Cmov4 | ( | const ArrayQuaternion & | arg1,
|  | const ArrayQuaternion & | arg2,
|  | ArrayMaskR | mask )
| inlinestatic

Conditional move.

Selects between arg1 & arg2 according to mask:

this[i] = mask[i] != 0 ? arg1[i] : arg2[i]

See also
  MathlibNEON::Cmov4

Remarks
  If mask param contains anything other than 0's or 0xffffffff's the result is undefined. If you wanted to do a = cmov4( a, b ), then consider using the update version see Cmov4( ArrayMaskR mask, const ArrayQuaternion &replacement ); instead.

Parameters

  arg1 | First array of Vectors
  arg2 | Second array of Vectors
  mask | mask filled with either 0's or 0xFFFFFFFF

References ArrayQuaternion(), IDENTITY, and ZERO.

## ◆ Cmov4() [6/6]

ArrayQuaternion Ogre::ArrayQuaternion::Cmov4 | ( | const ArrayQuaternion & | arg1,
|  | const ArrayQuaternion & | arg2,
|  | ArrayMaskR | mask )
| inlinestatic

Conditional move.

Selects between arg1 & arg2 according to mask:

this[i] = mask[i] != 0 ? arg1[i] : arg2[i]

See also
  MathlibSSE2::Cmov4

Remarks
  If mask param contains anything other than 0's or 0xffffffff's the result is undefined. If you wanted to do a = cmov4( a, b ), then consider using the update version see Cmov4( ArrayMaskR mask, const ArrayQuaternion &replacement ); instead.

Parameters

  arg1 | First array of Vectors
  arg2 | Second array of Vectors
  mask | mask filled with either 0's or 0xFFFFFFFF

References ArrayQuaternion(), IDENTITY, and ZERO.

## ◆ Dot() [1/3]

ArrayReal Ogre::ArrayQuaternion::Dot | ( | const ArrayQuaternion & | rkQ | ) | const
| inline

Returns the dot product of the quaternion.

References ArrayQuaternion().

## ◆ Dot() [2/3]

ArrayReal Ogre::ArrayQuaternion::Dot | ( | const ArrayQuaternion & | rkQ | ) | const
| inline

Returns the dot product of the quaternion.

References ArrayQuaternion().

## ◆ Dot() [3/3]

ArrayReal Ogre::ArrayQuaternion::Dot | ( | const ArrayQuaternion & | rkQ | ) | const
| inline

Returns the dot product of the quaternion.

References ArrayQuaternion().

## ◆ Exp() [1/3]

ArrayQuaternion Ogre::ArrayQuaternion::Exp | ( |  | ) | const
| inline

References ArrayQuaternion().

## ◆ Exp() [2/3]

ArrayQuaternion Ogre::ArrayQuaternion::Exp | ( |  | ) | const
| inline

References ArrayQuaternion().

## ◆ Exp() [3/3]

ArrayQuaternion Ogre::ArrayQuaternion::Exp | ( |  | ) | const
| inline

References ArrayQuaternion().

## ◆ FromAngleAxis() [1/3]

void Ogre::ArrayQuaternion::FromAngleAxis | ( | const ArrayRadian & | rfAngle,
|  | const ArrayVector3 & | rkAxis )
| inline

Setups the quaternion using the supplied vector, and "roll" around that vector by the specified radians.

## ◆ FromAngleAxis() [2/3]

void Ogre::ArrayQuaternion::FromAngleAxis | ( | const ArrayRadian & | rfAngle,
|  | const ArrayVector3 & | rkAxis )
| inline

Setups the quaternion using the supplied vector, and "roll" around that vector by the specified radians.

## ◆ FromAngleAxis() [3/3]

void Ogre::ArrayQuaternion::FromAngleAxis | ( | const ArrayRadian & | rfAngle,
|  | const ArrayVector3 & | rkAxis )
| inline

Setups the quaternion using the supplied vector, and "roll" around that vector by the specified radians.

## ◆ FromOrthoDet1RotationMatrix() [1/3]

void Ogre::ArrayQuaternion::FromOrthoDet1RotationMatrix | ( | const ArrayReal *RESTRICT_ALIAS | matrix | ) |
| inline

See also
  Quaternion::FromRotationMatrix This code assumes that: Quaternion is orthogonal Determinant of quaternion is 1.

Parameters

  matrix | 9-element matrix (3x3)

References RESTRICT_ALIAS.

## ◆ FromOrthoDet1RotationMatrix() [2/3]

void Ogre::ArrayQuaternion::FromOrthoDet1RotationMatrix | ( | const ArrayReal *RESTRICT_ALIAS | matrix | ) |
| inline

See also
  Quaternion::FromRotationMatrix This code assumes that: Quaternion is orthogonal Determinant of quaternion is 1.

Parameters

  matrix | 9-element matrix (3x3)

References RESTRICT_ALIAS.

## ◆ FromOrthoDet1RotationMatrix() [3/3]

void Ogre::ArrayQuaternion::FromOrthoDet1RotationMatrix | ( | const ArrayReal *RESTRICT_ALIAS | matrix | ) |
| inline

See also
  Quaternion::FromRotationMatrix This code assumes that: Quaternion is orthogonal Determinant of quaternion is 1.

Parameters

  matrix | 9-element matrix (3x3)

References RESTRICT_ALIAS.

## ◆ getAsQuaternion() [1/6]

void Ogre::ArrayQuaternion::getAsQuaternion | ( | Quaternion & | out,
|  | size_t | index ) const
| inline

References ARRAY_PACKED_REALS, w, Ogre::Quaternion::w, Ogre::Quaternion::x, Ogre::Quaternion::y, and Ogre::Quaternion::z.

Referenced by Ogre::BoneTransform::copy(), and Ogre::Transform::copy().

## ◆ getAsQuaternion() [2/6]

void Ogre::ArrayQuaternion::getAsQuaternion | ( | Quaternion & | out,
|  | size_t | index ) const
| inline

References ARRAY_PACKED_REALS, mChunkBase, Ogre::Quaternion::w, Ogre::Quaternion::x, Ogre::Quaternion::y, and Ogre::Quaternion::z.

## ◆ getAsQuaternion() [3/6]

void Ogre::ArrayQuaternion::getAsQuaternion | ( | Quaternion & | out,
|  | size_t | index ) const
| inline

References ARRAY_PACKED_REALS, mChunkBase, Ogre::Quaternion::w, Ogre::Quaternion::x, Ogre::Quaternion::y, and Ogre::Quaternion::z.

## ◆ getAsQuaternion() [4/6]

Quaternion Ogre::ArrayQuaternion::getAsQuaternion | ( | size_t | index | ) | const
| inline

Prefer using.

See also
  getAsQuaternion() because this function may have more overhead (the other one is faster)

References ARRAY_PACKED_REALS, and w.

## ◆ getAsQuaternion() [5/6]

Quaternion Ogre::ArrayQuaternion::getAsQuaternion | ( | size_t | index | ) | const
| inline

Prefer using.

See also
  getAsQuaternion() because this function may have more overhead (the other one is faster)

References ARRAY_PACKED_REALS, and mChunkBase.

## ◆ getAsQuaternion() [6/6]

Quaternion Ogre::ArrayQuaternion::getAsQuaternion | ( | size_t | index | ) | const
| inline

Prefer using.

See also
  getAsQuaternion() because this function may have more overhead (the other one is faster)

References ARRAY_PACKED_REALS, and mChunkBase.

## ◆ Inverse() [1/3]

ArrayQuaternion Ogre::ArrayQuaternion::Inverse | ( |  | ) | const
| inline

References ArrayQuaternion().

## ◆ Inverse() [2/3]

ArrayQuaternion Ogre::ArrayQuaternion::Inverse | ( |  | ) | const
| inline

References ArrayQuaternion().

## ◆ Inverse() [3/3]

ArrayQuaternion Ogre::ArrayQuaternion::Inverse | ( |  | ) | const
| inline

References ArrayQuaternion().

## ◆ Log() [1/3]

ArrayQuaternion Ogre::ArrayQuaternion::Log | ( |  | ) | const
| inline

References ArrayQuaternion().

## ◆ Log() [2/3]

ArrayQuaternion Ogre::ArrayQuaternion::Log | ( |  | ) | const
| inline

References ArrayQuaternion().

## ◆ Log() [3/3]

ArrayQuaternion Ogre::ArrayQuaternion::Log | ( |  | ) | const
| inline

References ArrayQuaternion().

## ◆ mul() [1/3]

void Ogre::ArrayQuaternion::mul | ( | const ArrayQuaternion & | inQ,
|  | ArrayVector3 & | inOutVec )
| inlinestatic

Rotates a vector by multiplying the quaternion to the vector, and modifies it's contents by storing the results there.

Remarks
  This function is the same as doing: ArrayVector v; ArrayQuaternion q; v = q * v; In fact, the operator overloading will make above code work perfectly. However, because we don't trust all compilers in optimizing this performance-sensitive function (in fact MSVC 2008 doesn't inline the op. and generates an unnecessary ArrayVector3) this function will take the input vector, and store the results back on that vector. This is very common when concatenating transformations on an ArrayVector3, whose memory reside in the heap (it makes better usage of the memory). Long story short, prefer calling this function to using an operator when just updating an ArrayVector3 is involved. (It's fine using operators for ArrayVector3s)

References ArrayQuaternion().

## ◆ mul() [2/3]

void Ogre::ArrayQuaternion::mul | ( | const ArrayQuaternion & | inQ,
|  | ArrayVector3 & | inOutVec )
| inlinestatic

Rotates a vector by multiplying the quaternion to the vector, and modifies it's contents by storing the results there.

Remarks
  This function is the same as doing: ArrayVector v; ArrayQuaternion q; v = q * v; In fact, the operator overloading will make above code work perfectly. However, because we don't trust all compilers in optimizing this performance-sensitive function (in fact MSVC 2008 doesn't inline the op. and generates an unnecessary ArrayVector3) this function will take the input vector, and store the results back on that vector. This is very common when concatenating transformations on an ArrayVector3, whose memory reside in the heap (it makes better usage of the memory). Long story short, prefer calling this function to using an operator when just updating an ArrayVector3 is involved. (It's fine using operators for ArrayVector3s)

References ArrayQuaternion().

## ◆ mul() [3/3]

void Ogre::ArrayQuaternion::mul | ( | const ArrayQuaternion & | inQ,
|  | ArrayVector3 & | inOutVec )
| inlinestatic

Rotates a vector by multiplying the quaternion to the vector, and modifies it's contents by storing the results there.

Remarks
  This function is the same as doing: ArrayVector v; ArrayQuaternion q; v = q * v; In fact, the operator overloading will make above code work perfectly. However, because we don't trust all compilers in optimizing this performance-sensitive function (in fact MSVC 2008 doesn't inline the op. and generates an unnecessary ArrayVector3) this function will take the input vector, and store the results back on that vector. This is very common when concatenating transformations on an ArrayVector3, whose memory reside in the heap (it makes better usage of the memory). Long story short, prefer calling this function to using an operator when just updating an ArrayVector3 is involved. (It's fine using operators for ArrayVector3s)

References ArrayQuaternion().

## ◆ nlerp() [1/3]

ArrayQuaternion Ogre::ArrayQuaternion::nlerp | ( | ArrayReal | fT,
|  | const ArrayQuaternion & | rkP,
|  | const ArrayQuaternion & | rkQ )
| inlinestatic

See also
  Quaternion::nlerp

Remarks
  shortestPath is always false

References ArrayQuaternion().

## ◆ nlerp() [2/3]

ArrayQuaternion Ogre::ArrayQuaternion::nlerp | ( | ArrayReal | fT,
|  | const ArrayQuaternion & | rkP,
|  | const ArrayQuaternion & | rkQ )
| inlinestatic

See also
  Quaternion::nlerp

Remarks
  shortestPath is always false

References ArrayQuaternion().

## ◆ nlerp() [3/3]

ArrayQuaternion Ogre::ArrayQuaternion::nlerp | ( | ArrayReal | fT,
|  | const ArrayQuaternion & | rkP,
|  | const ArrayQuaternion & | rkQ )
| inlinestatic

See also
  Quaternion::nlerp

Remarks
  shortestPath is always false

References ArrayQuaternion().

## ◆ nlerpShortest() [1/3]

ArrayQuaternion Ogre::ArrayQuaternion::nlerpShortest | ( | ArrayReal | fT,
|  | const ArrayQuaternion & | rkP,
|  | const ArrayQuaternion & | rkQ )
| inlinestatic

See also
  Quaternion::nlerp

Remarks
  shortestPath is always true

References ArrayQuaternion().

## ◆ nlerpShortest() [2/3]

ArrayQuaternion Ogre::ArrayQuaternion::nlerpShortest | ( | ArrayReal | fT,
|  | const ArrayQuaternion & | rkP,
|  | const ArrayQuaternion & | rkQ )
| inlinestatic

See also
  Quaternion::nlerp

Remarks
  shortestPath is always true

References ArrayQuaternion().

## ◆ nlerpShortest() [3/3]

ArrayQuaternion Ogre::ArrayQuaternion::nlerpShortest | ( | ArrayReal | fT,
|  | const ArrayQuaternion & | rkP,
|  | const ArrayQuaternion & | rkQ )
| inlinestatic

See also
  Quaternion::nlerp

Remarks
  shortestPath is always true

References ArrayQuaternion().

## ◆ Norm() [1/3]

ArrayReal Ogre::ArrayQuaternion::Norm | ( |  | ) | const
| inline

## ◆ Norm() [2/3]

ArrayReal Ogre::ArrayQuaternion::Norm | ( |  | ) | const
| inline

## ◆ Norm() [3/3]

ArrayReal Ogre::ArrayQuaternion::Norm | ( |  | ) | const
| inline

## ◆ normalise() [1/3]

void Ogre::ArrayQuaternion::normalise | ( |  | ) |
| inline

Unlike Quaternion::normalise(), this function does not return the length of the vector because such value was not cached and was never available.

See also
  Quaternion::normalise()

## ◆ normalise() [2/3]

void Ogre::ArrayQuaternion::normalise | ( |  | ) |
| inline

Unlike Quaternion::normalise(), this function does not return the length of the vector because such value was not cached and was never available.

See also
  Quaternion::normalise()

## ◆ normalise() [3/3]

void Ogre::ArrayQuaternion::normalise | ( |  | ) |
| inline

Unlike Quaternion::normalise(), this function does not return the length of the vector because such value was not cached and was never available.

See also
  Quaternion::normalise()

## ◆ operator*() [1/3]

ArrayVector3 Ogre::ArrayQuaternion::operator* | ( | const ArrayVector3 & | v | ) | const
| inline

Rotation of a vector by a quaternion.

## ◆ operator*() [2/3]

ArrayVector3 Ogre::ArrayQuaternion::operator* | ( | const ArrayVector3 & | v | ) | const
| inline

Rotation of a vector by a quaternion.

## ◆ operator*() [3/3]

ArrayVector3 Ogre::ArrayQuaternion::operator* | ( | const ArrayVector3 & | v | ) | const
| inline

Rotation of a vector by a quaternion.

## ◆ operator*=() [1/3]

void Ogre::ArrayQuaternion::operator*= | ( | const ArrayReal | fScalar | ) |
| inline

## ◆ operator*=() [2/3]

void Ogre::ArrayQuaternion::operator*= | ( | const ArrayReal | fScalar | ) |
| inline

## ◆ operator*=() [3/3]

void Ogre::ArrayQuaternion::operator*= | ( | const ArrayReal | fScalar | ) |
| inline

## ◆ operator+=() [1/3]

void Ogre::ArrayQuaternion::operator+= | ( | const ArrayQuaternion & | a | ) |
| inline

References ArrayQuaternion().

## ◆ operator+=() [2/3]

void Ogre::ArrayQuaternion::operator+= | ( | const ArrayQuaternion & | a | ) |
| inline

References ArrayQuaternion().

## ◆ operator+=() [3/3]

void Ogre::ArrayQuaternion::operator+= | ( | const ArrayQuaternion & | a | ) |
| inline

References ArrayQuaternion().

## ◆ operator-=() [1/3]

void Ogre::ArrayQuaternion::operator-= | ( | const ArrayQuaternion & | a | ) |
| inline

References ArrayQuaternion().

## ◆ operator-=() [2/3]

void Ogre::ArrayQuaternion::operator-= | ( | const ArrayQuaternion & | a | ) |
| inline

References ArrayQuaternion().

## ◆ operator-=() [3/3]

void Ogre::ArrayQuaternion::operator-= | ( | const ArrayQuaternion & | a | ) |
| inline

References ArrayQuaternion().

## ◆ setAll() [1/3]

void Ogre::ArrayQuaternion::setAll | ( | const Quaternion & | v | ) |
| inline

References w, Ogre::Quaternion::w, x, Ogre::Quaternion::x, y, Ogre::Quaternion::y, z, and Ogre::Quaternion::z.

## ◆ setAll() [2/3]

void Ogre::ArrayQuaternion::setAll | ( | const Quaternion & | v | ) |
| inline

References mChunkBase, Ogre::Quaternion::w, Ogre::Quaternion::x, Ogre::Quaternion::y, and Ogre::Quaternion::z.

## ◆ setAll() [3/3]

void Ogre::ArrayQuaternion::setAll | ( | const Quaternion & | v | ) |
| inline

References mChunkBase, Ogre::Quaternion::w, Ogre::Quaternion::x, Ogre::Quaternion::y, and Ogre::Quaternion::z.

## ◆ setFromQuaternion() [1/3]

void Ogre::ArrayQuaternion::setFromQuaternion | ( | const Quaternion & | v,
|  | size_t | index )
| inline

References ARRAY_PACKED_REALS, w, Ogre::Quaternion::w, Ogre::Quaternion::x, Ogre::Quaternion::y, and Ogre::Quaternion::z.

## ◆ setFromQuaternion() [2/3]

void Ogre::ArrayQuaternion::setFromQuaternion | ( | const Quaternion & | v,
|  | size_t | index )
| inline

References ARRAY_PACKED_REALS, mChunkBase, Ogre::Quaternion::w, Ogre::Quaternion::x, Ogre::Quaternion::y, and Ogre::Quaternion::z.

## ◆ setFromQuaternion() [3/3]

void Ogre::ArrayQuaternion::setFromQuaternion | ( | const Quaternion & | v,
|  | size_t | index )
| inline

References ARRAY_PACKED_REALS, mChunkBase, Ogre::Quaternion::w, Ogre::Quaternion::x, Ogre::Quaternion::y, and Ogre::Quaternion::z.

## ◆ Slerp() [1/3]

ArrayQuaternion Ogre::ArrayQuaternion::Slerp | ( | ArrayReal | fT,
|  | const ArrayQuaternion & | rkP,
|  | const ArrayQuaternion & | rkQ )
| inlinestatic

See also
  Quaternion::Slerp

Remarks
  shortestPath is always true

References ArrayQuaternion().

## ◆ Slerp() [2/3]

ArrayQuaternion Ogre::ArrayQuaternion::Slerp | ( | ArrayReal | fT,
|  | const ArrayQuaternion & | rkP,
|  | const ArrayQuaternion & | rkQ )
| inlinestatic

See also
  Quaternion::Slerp

Remarks
  shortestPath is always true

References ArrayQuaternion().

## ◆ Slerp() [3/3]

ArrayQuaternion Ogre::ArrayQuaternion::Slerp | ( | ArrayReal | fT,
|  | const ArrayQuaternion & | rkP,
|  | const ArrayQuaternion & | rkQ )
| inlinestatic

See also
  Quaternion::Slerp

Remarks
  shortestPath is always true

References ArrayQuaternion().

## ◆ ToAngleAxis() [1/3]

void Ogre::ArrayQuaternion::ToAngleAxis | ( | ArrayRadian & | rfAngle,
|  | ArrayVector3 & | rkAxis ) const
| inline

## ◆ ToAngleAxis() [2/3]

void Ogre::ArrayQuaternion::ToAngleAxis | ( | ArrayRadian & | rfAngle,
|  | ArrayVector3 & | rkAxis ) const
| inline

## ◆ ToAngleAxis() [3/3]

void Ogre::ArrayQuaternion::ToAngleAxis | ( | ArrayRadian & | rfAngle,
|  | ArrayVector3 & | rkAxis ) const
| inline

## ◆ UnitInverse() [1/3]

ArrayQuaternion Ogre::ArrayQuaternion::UnitInverse | ( |  | ) | const
| inline

References ArrayQuaternion().

## ◆ UnitInverse() [2/3]

ArrayQuaternion Ogre::ArrayQuaternion::UnitInverse | ( |  | ) | const
| inline

References ArrayQuaternion().

## ◆ UnitInverse() [3/3]

ArrayQuaternion Ogre::ArrayQuaternion::UnitInverse | ( |  | ) | const
| inline

References ArrayQuaternion().

## ◆ xAxis() [1/3]

ArrayVector3 Ogre::ArrayQuaternion::xAxis | ( |  | ) | const
| inline

Returns the X orthonormal axis defining the quaternion.

Same as doing xAxis = Vector3::UNIT_X * this. Also called the local X-axis

## ◆ xAxis() [2/3]

ArrayVector3 Ogre::ArrayQuaternion::xAxis | ( |  | ) | const
| inline

Returns the X orthonormal axis defining the quaternion.

Same as doing xAxis = Vector3::UNIT_X * this. Also called the local X-axis

## ◆ xAxis() [3/3]

ArrayVector3 Ogre::ArrayQuaternion::xAxis | ( |  | ) | const
| inline

Returns the X orthonormal axis defining the quaternion.

Same as doing xAxis = Vector3::UNIT_X * this. Also called the local X-axis

## ◆ yAxis() [1/3]

ArrayVector3 Ogre::ArrayQuaternion::yAxis | ( |  | ) | const
| inline

Returns the Y orthonormal axis defining the quaternion.

Same as doing yAxis = Vector3::UNIT_Y * this. Also called the local Y-axis

## ◆ yAxis() [2/3]

ArrayVector3 Ogre::ArrayQuaternion::yAxis | ( |  | ) | const
| inline

Returns the Y orthonormal axis defining the quaternion.

Same as doing yAxis = Vector3::UNIT_Y * this. Also called the local Y-axis

## ◆ yAxis() [3/3]

ArrayVector3 Ogre::ArrayQuaternion::yAxis | ( |  | ) | const
| inline

Returns the Y orthonormal axis defining the quaternion.

Same as doing yAxis = Vector3::UNIT_Y * this. Also called the local Y-axis

## ◆ zAxis() [1/3]

ArrayVector3 Ogre::ArrayQuaternion::zAxis | ( |  | ) | const
| inline

Returns the Z orthonormal axis defining the quaternion.

Same as doing zAxis = Vector3::UNIT_Z * this. Also called the local Z-axis

## ◆ zAxis() [2/3]

ArrayVector3 Ogre::ArrayQuaternion::zAxis | ( |  | ) | const
| inline

Returns the Z orthonormal axis defining the quaternion.

Same as doing zAxis = Vector3::UNIT_Z * this. Also called the local Z-axis

## ◆ zAxis() [3/3]

ArrayVector3 Ogre::ArrayQuaternion::zAxis | ( |  | ) | const
| inline

Returns the Z orthonormal axis defining the quaternion.

Same as doing zAxis = Vector3::UNIT_Z * this. Also called the local Z-axis

## Member Data Documentation

## ◆ IDENTITY

const ArrayQuaternion Ogre::ArrayQuaternion::IDENTITY
| static

Referenced by Cmov4().

## ◆ mChunkBase

ArrayReal Ogre::ArrayQuaternion::mChunkBase

Referenced by ArrayQuaternion(), getAsQuaternion(), getAsQuaternion(), setAll(), and setFromQuaternion().

## ◆ w

Real Ogre::ArrayQuaternion::w

Referenced by ArrayQuaternion(), getAsQuaternion(), getAsQuaternion(), setAll(), and setFromQuaternion().

## ◆ x

Real Ogre::ArrayQuaternion::x

Referenced by ArrayQuaternion(), and setAll().

## ◆ y

Real Ogre::ArrayQuaternion::y

Referenced by ArrayQuaternion(), and setAll().

## ◆ z

Real Ogre::ArrayQuaternion::z

Referenced by ArrayQuaternion(), and setAll().

## ◆ ZERO

const ArrayQuaternion Ogre::ArrayQuaternion::ZERO
| static

Referenced by Cmov4().

The documentation for this class was generated from the following files:

- C/OgreArrayQuaternion.h
- NEON/Single/OgreArrayQuaternion.h
- SSE2/Single/OgreArrayQuaternion.h