OGRE 2.1
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::ArrayQuaternion Class Reference

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 (void) const
 
ArrayQuaternion Exp (void) const
 
ArrayQuaternion Exp (void) 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 (void) const
 
ArrayQuaternion Inverse (void) const
 
ArrayQuaternion Inverse (void) const
 
ArrayQuaternion Log (void) const
 
ArrayQuaternion Log (void) const
 
ArrayQuaternion Log (void) const
 
ArrayReal Norm (void) const
 
ArrayReal Norm (void) const
 
ArrayReal Norm (void) const
 
void normalise (void)
 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 (void)
 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 (void)
 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 (void) const
 
ArrayQuaternion UnitInverse (void) const
 
ArrayQuaternion UnitInverse (void) const
 
ArrayVector3 xAxis (void) const
 Returns the X orthonormal axis defining the quaternion.
 
ArrayVector3 xAxis (void) const
 Returns the X orthonormal axis defining the quaternion.
 
ArrayVector3 xAxis (void) const
 Returns the X orthonormal axis defining the quaternion.
 
ArrayVector3 yAxis (void) const
 Returns the Y orthonormal axis defining the quaternion.
 
ArrayVector3 yAxis (void) const
 Returns the Y orthonormal axis defining the quaternion.
 
ArrayVector3 yAxis (void) const
 Returns the Y orthonormal axis defining the quaternion.
 
ArrayVector3 zAxis (void) const
 Returns the Z orthonormal axis defining the quaternion.
 
ArrayVector3 zAxis (void) const
 Returns the Z orthonormal axis defining the quaternion.
 
ArrayVector3 zAxis (void) 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)
 @See Quaternion::nlerp
 
static ArrayQuaternion nlerp (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
 @See Quaternion::nlerp
 
static ArrayQuaternion nlerp (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
 @See Quaternion::nlerp
 
static ArrayQuaternion nlerpShortest (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
 @See Quaternion::nlerp
 
static ArrayQuaternion nlerpShortest (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
 @See Quaternion::nlerp
 
static ArrayQuaternion nlerpShortest (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
 @See Quaternion::nlerp
 
static ArrayQuaternion Slerp (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
 @See Quaternion::Slerp
 
static ArrayQuaternion Slerp (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
 @See Quaternion::Slerp
 
static ArrayQuaternion Slerp (ArrayReal fT, const ArrayQuaternion &rkP, const ArrayQuaternion &rkQ)
 @See Quaternion::Slerp
 

Public Attributes

ArrayReal mChunkBase [4]
 
Real w
 
Real x
 
Real y
 
Real z
 

Static Public Attributes

static const ArrayQuaternion IDENTITY
 
static const ArrayQuaternion ZERO
 

Friends

ArrayQuaternion operator* (ArrayReal scalar, const ArrayQuaternion &lhs)
 
ArrayQuaternion operator* (ArrayReal scalar, const ArrayQuaternion &lhs)
 
ArrayQuaternion operator* (ArrayReal scalar, const ArrayQuaternion &lhs)
 
ArrayQuaternion operator* (const ArrayQuaternion &lhs, ArrayReal scalar)
 
ArrayQuaternion operator* (const ArrayQuaternion &lhs, ArrayReal scalar)
 
ArrayQuaternion operator* (const ArrayQuaternion &lhs, ArrayReal scalar)
 
ArrayQuaternion operator* (const ArrayQuaternion &lhs, const ArrayQuaternion &rhs)
 
ArrayQuaternion operator* (const ArrayQuaternion &lhs, const ArrayQuaternion &rhs)
 
ArrayQuaternion operator* (const ArrayQuaternion &lhs, const ArrayQuaternion &rhs)
 
ArrayQuaternion operator+ (const ArrayQuaternion &lhs, const ArrayQuaternion &rhs)
 
ArrayQuaternion operator+ (const ArrayQuaternion &lhs, const ArrayQuaternion &rhs)
 
ArrayQuaternion operator+ (const ArrayQuaternion &lhs, const ArrayQuaternion &rhs)
 
ArrayQuaternion operator- (const ArrayQuaternion &lhs, const ArrayQuaternion &rhs)
 
ArrayQuaternion operator- (const ArrayQuaternion &lhs, const ArrayQuaternion &rhs)
 
ArrayQuaternion operator- (const ArrayQuaternion &lhs, const ArrayQuaternion &rhs)
 

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

◆ ArrayQuaternion() [2/6]

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

◆ 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

◆ 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

Member Function Documentation

◆ Cmov4() [1/6]

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

Conditional move update.

@See MathlibC::Cmov4 Changes each of the four vectors contained in 'this' with the replacement provided

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 also
Cmov4( const ArrayQuaternion &arg1, const ArrayQuaternion &arg2, ArrayReal mask ); instead.
Parameters
Vectorsto be used as replacement if the mask is zero.
maskfilled with either 0's or 0xFFFFFFFF
Returns
this[i] = mask[i] != 0 ? this[i] : replacement[i]

◆ Cmov4() [2/6]

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

Conditional move update.

@See MathlibNEON::Cmov4 Changes each of the four vectors contained in 'this' with the replacement provided

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 also
Cmov4( const ArrayQuaternion &arg1, const ArrayQuaternion &arg2, ArrayReal mask ); instead.
Parameters
Vectorsto be used as replacement if the mask is zero.
maskfilled with either 0's or 0xFFFFFFFF
Returns
this[i] = mask[i] != 0 ? this[i] : replacement[i]

◆ Cmov4() [3/6]

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

Conditional move update.

@See MathlibSSE2::Cmov4 Changes each of the four vectors contained in 'this' with the replacement provided

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 also
Cmov4( const ArrayQuaternion &arg1, const ArrayQuaternion &arg2, ArrayReal mask ); instead.
Parameters
Vectorsto be used as replacement if the mask is zero.
maskfilled with either 0's or 0xFFFFFFFF
Returns
this[i] = mask[i] != 0 ? this[i] : replacement[i]

◆ Cmov4() [4/6]

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

Conditional move.

@See MathlibC::Cmov4 Selects between arg1 & arg2 according to mask

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 also
Cmov4( ArrayReal mask, const ArrayQuaternion &replacement ); instead.
Parameters
Firstarray of Vectors
Secondarray of Vectors
maskfilled with either 0's or 0xFFFFFFFF
Returns
this[i] = mask[i] != 0 ? arg1[i] : arg2[i]

◆ Cmov4() [5/6]

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

Conditional move.

@See MathlibNEON::Cmov4 Selects between arg1 & arg2 according to mask

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 also
Cmov4( ArrayReal mask, const ArrayQuaternion &replacement ); instead.
Parameters
Firstarray of Vectors
Secondarray of Vectors
maskfilled with either 0's or 0xFFFFFFFF
Returns
this[i] = mask[i] != 0 ? arg1[i] : arg2[i]

◆ Cmov4() [6/6]

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

Conditional move.

@See MathlibSSE2::Cmov4 Selects between arg1 & arg2 according to mask

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 also
Cmov4( ArrayReal mask, const ArrayQuaternion &replacement ); instead.
Parameters
Firstarray of Vectors
Secondarray of Vectors
maskfilled with either 0's or 0xFFFFFFFF
Returns
this[i] = mask[i] != 0 ? arg1[i] : arg2[i]

◆ Dot() [1/3]

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

Returns the dot product of the quaternion.

◆ Dot() [2/3]

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

Returns the dot product of the quaternion.

◆ Dot() [3/3]

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

Returns the dot product of the quaternion.

◆ Exp() [1/3]

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

◆ Exp() [2/3]

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

◆ Exp() [3/3]

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

◆ 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
matrix9-element matrix (3x3)

◆ 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
matrix9-element matrix (3x3)

◆ 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
matrix9-element matrix (3x3)

◆ getAsQuaternion() [1/6]

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

References ARRAY_PACKED_REALS.

◆ getAsQuaternion() [2/6]

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

References ARRAY_PACKED_REALS.

◆ getAsQuaternion() [3/6]

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

References ARRAY_PACKED_REALS.

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

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

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

◆ Inverse() [1/3]

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

◆ Inverse() [2/3]

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

◆ Inverse() [3/3]

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

◆ Log() [1/3]

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

◆ Log() [2/3]

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

◆ Log() [3/3]

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

◆ mul() [1/3]

static 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)
Parameters

◆ mul() [2/3]

static 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)
Parameters

◆ mul() [3/3]

static 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)
Parameters

◆ nlerp() [1/3]

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

@See Quaternion::nlerp

Remarks
shortestPath is always false

◆ nlerp() [2/3]

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

@See Quaternion::nlerp

Remarks
shortestPath is always false

◆ nlerp() [3/3]

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

@See Quaternion::nlerp

Remarks
shortestPath is always false

◆ nlerpShortest() [1/3]

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

@See Quaternion::nlerp

Remarks
shortestPath is always true

◆ nlerpShortest() [2/3]

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

@See Quaternion::nlerp

Remarks
shortestPath is always true

◆ nlerpShortest() [3/3]

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

@See Quaternion::nlerp

Remarks
shortestPath is always true

◆ Norm() [1/3]

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

◆ Norm() [2/3]

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

◆ Norm() [3/3]

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

◆ normalise() [1/3]

void Ogre::ArrayQuaternion::normalise ( void  )
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 ( void  )
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 ( void  )
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

◆ operator+=() [2/3]

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

◆ operator+=() [3/3]

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

◆ operator-=() [1/3]

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

◆ operator-=() [2/3]

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

◆ operator-=() [3/3]

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

◆ setAll() [1/3]

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

◆ setAll() [2/3]

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

◆ setAll() [3/3]

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

◆ setFromQuaternion() [1/3]

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

◆ setFromQuaternion() [2/3]

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

References ARRAY_PACKED_REALS.

◆ setFromQuaternion() [3/3]

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

References ARRAY_PACKED_REALS.

◆ Slerp() [1/3]

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

@See Quaternion::Slerp

Remarks
shortestPath is always true

◆ Slerp() [2/3]

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

@See Quaternion::Slerp

Remarks
shortestPath is always true

◆ Slerp() [3/3]

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

@See Quaternion::Slerp

Remarks
shortestPath is always true

◆ 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 ( void  ) const
inline

◆ UnitInverse() [2/3]

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

◆ UnitInverse() [3/3]

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

◆ xAxis() [1/3]

ArrayVector3 Ogre::ArrayQuaternion::xAxis ( void  ) 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 ( void  ) 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 ( void  ) 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 ( void  ) 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 ( void  ) 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 ( void  ) 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 ( void  ) 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 ( void  ) 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 ( void  ) const
inline

Returns the Z orthonormal axis defining the quaternion.

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

Friends And Related Symbol Documentation

◆ operator* [1/9]

ArrayQuaternion operator* ( ArrayReal  scalar,
const ArrayQuaternion lhs 
)
friend

◆ operator* [2/9]

ArrayQuaternion operator* ( ArrayReal  scalar,
const ArrayQuaternion lhs 
)
friend

◆ operator* [3/9]

ArrayQuaternion operator* ( ArrayReal  scalar,
const ArrayQuaternion lhs 
)
friend

◆ operator* [4/9]

ArrayQuaternion operator* ( const ArrayQuaternion lhs,
ArrayReal  scalar 
)
friend

◆ operator* [5/9]

ArrayQuaternion operator* ( const ArrayQuaternion lhs,
ArrayReal  scalar 
)
friend

◆ operator* [6/9]

ArrayQuaternion operator* ( const ArrayQuaternion lhs,
ArrayReal  scalar 
)
friend

◆ operator* [7/9]

◆ operator* [8/9]

◆ operator* [9/9]

◆ operator+ [1/3]

◆ operator+ [2/3]

◆ operator+ [3/3]

◆ operator- [1/3]

◆ operator- [2/3]

◆ operator- [3/3]

Member Data Documentation

◆ IDENTITY

static const ArrayQuaternion Ogre::ArrayQuaternion::IDENTITY
static

◆ mChunkBase

ArrayReal Ogre::ArrayQuaternion::mChunkBase

◆ w

Real Ogre::ArrayQuaternion::w

◆ x

Real Ogre::ArrayQuaternion::x

◆ y

Real Ogre::ArrayQuaternion::y

◆ z

Real Ogre::ArrayQuaternion::z

◆ ZERO

static const ArrayQuaternion Ogre::ArrayQuaternion::ZERO
static

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