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

Cache-friendly array of 3-dimensional represented as a SoA array. More...

#include <OgreArrayVector3.h>

Public Member Functions

 ArrayVector3 ()
 
 ArrayVector3 ()
 
 ArrayVector3 ()
 
 ArrayVector3 (ArrayReal chunkX, ArrayReal chunkY, ArrayReal chunkZ)
 
 ArrayVector3 (ArrayReal chunkX, ArrayReal chunkY, ArrayReal chunkZ)
 
 ArrayVector3 (ArrayReal chunkX, ArrayReal chunkY, ArrayReal chunkZ)
 
ArrayReal absDotProduct (const ArrayVector3 &vec) const
 Calculates the absolute dot (scalar) product of this vector with another.
 
ArrayReal absDotProduct (const ArrayVector3 &vec) const
 Calculates the absolute dot (scalar) product of this vector with another.
 
ArrayReal absDotProduct (const ArrayVector3 &vec) const
 Calculates the absolute dot (scalar) product of this vector with another.
 
void Cmov4 (ArrayMaskR mask, const ArrayVector3 &replacement)
 Conditional move update.
 
void Cmov4 (ArrayMaskR mask, const ArrayVector3 &replacement)
 Conditional move update.
 
void Cmov4 (ArrayMaskR mask, const ArrayVector3 &replacement)
 Conditional move update.
 
void CmovRobust (ArrayMaskR mask, const ArrayVector3 &replacement)
 Conditional move update.
 
void CmovRobust (ArrayMaskR mask, const ArrayVector3 &replacement)
 Conditional move update.
 
void CmovRobust (ArrayMaskR mask, const ArrayVector3 &replacement)
 Conditional move update.
 
Vector3 collapseMax (void) const
 Takes each Vector and returns one returns a single vector.
 
Vector3 collapseMax (void) const
 Takes each Vector and returns one returns a single vector.
 
Vector3 collapseMax (void) const
 Takes each Vector and returns one returns a single vector.
 
Vector3 collapseMin (void) const
 Takes each Vector and returns one returns a single vector.
 
Vector3 collapseMin (void) const
 Takes each Vector and returns one returns a single vector.
 
Vector3 collapseMin (void) const
 Takes each Vector and returns one returns a single vector.
 
ArrayVector3 crossProduct (const ArrayVector3 &rkVector) const
 Calculates the cross-product of 2 vectors, i.e.
 
ArrayVector3 crossProduct (const ArrayVector3 &rkVector) const
 Calculates the cross-product of 2 vectors, i.e.
 
ArrayVector3 crossProduct (const ArrayVector3 &rkVector) const
 Calculates the cross-product of 2 vectors, i.e.
 
ArrayReal distance (const ArrayVector3 &rhs) const
 Returns the distance to another vector.
 
ArrayReal distance (const ArrayVector3 &rhs) const
 Returns the distance to another vector.
 
ArrayReal distance (const ArrayVector3 &rhs) const
 Returns the distance to another vector.
 
ArrayReal dotProduct (const ArrayVector3 &vec) const
 Calculates the dot (scalar) product of this vector with another.
 
ArrayReal dotProduct (const ArrayVector3 &vec) const
 Calculates the dot (scalar) product of this vector with another.
 
ArrayReal dotProduct (const ArrayVector3 &vec) const
 Calculates the dot (scalar) product of this vector with another.
 
Vector3 getAsVector3 (size_t index) const
 Prefer using.
 
Vector3 getAsVector3 (size_t index) const
 Prefer using.
 
Vector3 getAsVector3 (size_t index) const
 Prefer using.
 
void getAsVector3 (Vector3 &out, size_t index) const
 
void getAsVector3 (Vector3 &out, size_t index) const
 
void getAsVector3 (Vector3 &out, size_t index) const
 
ArrayReal getMaxComponent () const
 Returns the biggest value between x, y, z; max( x, y, z )
 
ArrayReal getMaxComponent () const
 Returns the biggest value between x, y, z; max( x, y, z )
 
ArrayReal getMaxComponent () const
 Returns the biggest value between x, y, z; max( x, y, z )
 
ArrayReal getMinComponent () const
 Returns the smallest value between x, y, z; min( x, y, z )
 
ArrayReal getMinComponent () const
 Returns the smallest value between x, y, z; min( x, y, z )
 
ArrayReal getMinComponent () const
 Returns the smallest value between x, y, z; min( x, y, z )
 
void inverseLeaveZeroes (void)
 Calculates the inverse of the vectors: 1.0f / v; But if original is zero, the zero is left (0 / 0 = 0).
 
void inverseLeaveZeroes (void)
 Calculates the inverse of the vectors: 1.0f / v; But if original is zero, the zero is left (0 / 0 = 0).
 
void inverseLeaveZeroes (void)
 Calculates the inverse of the vectors: 1.0f / v; But if original is zero, the zero is left (0 / 0 = 0).
 
int isNaN (void) const
 
int isNaN (void) const
 
int isNaN (void) const
 
ArrayReal length () const
 Returns the length (magnitude) of the vector.
 
ArrayReal length () const
 Returns the length (magnitude) of the vector.
 
ArrayReal length () const
 Returns the length (magnitude) of the vector.
 
void loadFromAoS (const Real *RESTRICT_ALIAS src)
 Converts 4 ARRAY_PACKED_REALS reals into this ArrayVector3.
 
void loadFromAoS (const Real *RESTRICT_ALIAS src)
 Converts 4 ARRAY_PACKED_REALS reals into this ArrayVector3.
 
void loadFromAoS (const Real *RESTRICT_ALIAS src)
 Converts 4 ARRAY_PACKED_REALS reals into this ArrayVector3.
 
void makeCeil (const ArrayVector3 &cmp)
 Sets this vector's components to the maximum of its own and the ones of the passed in vector.
 
void makeCeil (const ArrayVector3 &cmp)
 Sets this vector's components to the maximum of its own and the ones of the passed in vector.
 
void makeCeil (const ArrayVector3 &cmp)
 Sets this vector's components to the maximum of its own and the ones of the passed in vector.
 
void makeFloor (const ArrayVector3 &cmp)
 Sets this vector's components to the minimum of its own and the ones of the passed in vector.
 
void makeFloor (const ArrayVector3 &cmp)
 Sets this vector's components to the minimum of its own and the ones of the passed in vector.
 
void makeFloor (const ArrayVector3 &cmp)
 Sets this vector's components to the minimum of its own and the ones of the passed in vector.
 
ArrayVector3 midPoint (const ArrayVector3 &vec) const
 Returns a vector at a point half way between this and the passed in vector.
 
ArrayVector3 midPoint (const ArrayVector3 &vec) const
 Returns a vector at a point half way between this and the passed in vector.
 
ArrayVector3 midPoint (const ArrayVector3 &vec) const
 Returns a vector at a point half way between this and the passed in vector.
 
void normalise (void)
 Unlike Vector3::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 Vector3::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 Vector3::normalise(), this function does not return the length of the vector because such value was not cached and was never available.
 
ArrayVector3 normalisedCopy (void) const
 As normalise, except that this vector is unaffected and the normalised vector is returned as a copy.
 
ArrayVector3 normalisedCopy (void) const
 As normalise, except that this vector is unaffected and the normalised vector is returned as a copy.
 
ArrayVector3 normalisedCopy (void) const
 As normalise, except that this vector is unaffected and the normalised vector is returned as a copy.
 
void operator*= (const ArrayReal fScalar)
 
void operator*= (const ArrayReal fScalar)
 
void operator*= (const ArrayReal fScalar)
 
void operator*= (const ArrayVector3 &a)
 
void operator*= (const ArrayVector3 &a)
 
void operator*= (const ArrayVector3 &a)
 
void operator*= (const Real fScalar)
 
void operator*= (const Real fScalar)
 
const ArrayVector3operator+ () const
 
const ArrayVector3operator+ () const
 
const ArrayVector3operator+ () const
 
void operator+= (const ArrayReal fScalar)
 
void operator+= (const ArrayReal fScalar)
 
void operator+= (const ArrayReal fScalar)
 
void operator+= (const ArrayVector3 &a)
 
void operator+= (const ArrayVector3 &a)
 
void operator+= (const ArrayVector3 &a)
 
void operator+= (const Real fScalar)
 
void operator+= (const Real fScalar)
 
ArrayVector3 operator- () const
 
ArrayVector3 operator- () const
 
ArrayVector3 operator- () const
 
void operator-= (const ArrayReal fScalar)
 
void operator-= (const ArrayReal fScalar)
 
void operator-= (const ArrayReal fScalar)
 
void operator-= (const ArrayVector3 &a)
 
void operator-= (const ArrayVector3 &a)
 
void operator-= (const ArrayVector3 &a)
 
void operator-= (const Real fScalar)
 
void operator-= (const Real fScalar)
 
void operator/= (const ArrayReal fScalar)
 
void operator/= (const ArrayReal fScalar)
 
void operator/= (const ArrayReal fScalar)
 
void operator/= (const ArrayVector3 &a)
 
void operator/= (const ArrayVector3 &a)
 
void operator/= (const ArrayVector3 &a)
 
void operator/= (const Real fScalar)
 
void operator/= (const Real fScalar)
 
ArrayVector3operator= (const Real fScalar)
 Copies only one vector, by looking at the indexes.
 
ArrayVector3operator= (const Real fScalar)
 Copies only one vector, by looking at the indexes.
 
ArrayVector3operator= (const Real fScalar)
 Copies only one vector, by looking at the indexes.
 
ArrayVector3 perpendicular (void) const
 Generates a vector perpendicular to this vector (eg an 'up' vector).
 
ArrayVector3 perpendicular (void) const
 Generates a vector perpendicular to this vector (eg an 'up' vector).
 
ArrayVector3 perpendicular (void) const
 Generates a vector perpendicular to this vector (eg an 'up' vector).
 
ArrayVector3 primaryAxis (void) const
 Extract the primary (dominant) axis from this direction vector.
 
ArrayVector3 primaryAxis (void) const
 Extract the primary (dominant) axis from this direction vector.
 
ArrayVector3 primaryAxis (void) const
 Extract the primary (dominant) axis from this direction vector.
 
ArrayVector3 reflect (const ArrayVector3 &normal) const
 Calculates a reflection vector to the plane with the given normal .
 
ArrayVector3 reflect (const ArrayVector3 &normal) const
 Calculates a reflection vector to the plane with the given normal .
 
ArrayVector3 reflect (const ArrayVector3 &normal) const
 Calculates a reflection vector to the plane with the given normal .
 
void setAll (const Vector3 &v)
 Sets all packed vectors to the same value as the scalar input vector.
 
void setAll (const Vector3 &v)
 Sets all packed vectors to the same value as the scalar input vector.
 
void setAll (const Vector3 &v)
 Sets all packed vectors to the same value as the scalar input vector.
 
void setFromVector3 (const Vector3 &v, size_t index)
 
void setFromVector3 (const Vector3 &v, size_t index)
 
void setFromVector3 (const Vector3 &v, size_t index)
 
void setToSign ()
 Converts the vector to (sign(x), sign(y), sign(z))
 
void setToSign ()
 Converts the vector to (sign(x), sign(y), sign(z))
 
void setToSign ()
 Converts the vector to (sign(x), sign(y), sign(z))
 
ArrayReal squaredDistance (const ArrayVector3 &rhs) const
 Returns the square of the distance to another vector.
 
ArrayReal squaredDistance (const ArrayVector3 &rhs) const
 Returns the square of the distance to another vector.
 
ArrayReal squaredDistance (const ArrayVector3 &rhs) const
 Returns the square of the distance to another vector.
 
ArrayReal squaredLength () const
 Returns the square of the length(magnitude) of the vector.
 
ArrayReal squaredLength () const
 Returns the square of the length(magnitude) of the vector.
 
ArrayReal squaredLength () const
 Returns the square of the length(magnitude) of the vector.
 

Static Public Member Functions

static ArrayVector3 Cmov4 (const ArrayVector3 &arg1, const ArrayVector3 &arg2, ArrayMaskR mask)
 Conditional move.
 
static ArrayVector3 Cmov4 (const ArrayVector3 &arg1, const ArrayVector3 &arg2, ArrayMaskR mask)
 Conditional move.
 
static ArrayVector3 Cmov4 (const ArrayVector3 &arg1, const ArrayVector3 &arg2, ArrayMaskR mask)
 Conditional move.
 

Public Attributes

ArrayReal mChunkBase [3]
 

Static Public Attributes

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

Friends

ArrayVector3 operator* (ArrayReal fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator* (ArrayReal fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator* (ArrayReal fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator* (const ArrayVector3 &lhs, ArrayReal fScalar)
 
ArrayVector3 operator* (const ArrayVector3 &lhs, ArrayReal fScalar)
 
ArrayVector3 operator* (const ArrayVector3 &lhs, ArrayReal fScalar)
 
ArrayVector3 operator* (const ArrayVector3 &lhs, const ArrayVector3 &rhs)
 
ArrayVector3 operator* (const ArrayVector3 &lhs, const ArrayVector3 &rhs)
 
ArrayVector3 operator* (const ArrayVector3 &lhs, const ArrayVector3 &rhs)
 
ArrayVector3 operator* (const ArrayVector3 &lhs, Real fScalar)
 
ArrayVector3 operator* (const ArrayVector3 &lhs, Real fScalar)
 
ArrayVector3 operator* (const ArrayVector3 &lhs, Real fScalar)
 
ArrayVector3 operator* (Real fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator* (Real fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator* (Real fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator+ (ArrayReal fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator+ (ArrayReal fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator+ (ArrayReal fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator+ (const ArrayVector3 &lhs, ArrayReal fScalar)
 
ArrayVector3 operator+ (const ArrayVector3 &lhs, ArrayReal fScalar)
 
ArrayVector3 operator+ (const ArrayVector3 &lhs, ArrayReal fScalar)
 
ArrayVector3 operator+ (const ArrayVector3 &lhs, const ArrayVector3 &rhs)
 
ArrayVector3 operator+ (const ArrayVector3 &lhs, const ArrayVector3 &rhs)
 
ArrayVector3 operator+ (const ArrayVector3 &lhs, const ArrayVector3 &rhs)
 
ArrayVector3 operator+ (const ArrayVector3 &lhs, Real fScalar)
 
ArrayVector3 operator+ (const ArrayVector3 &lhs, Real fScalar)
 
ArrayVector3 operator+ (const ArrayVector3 &lhs, Real fScalar)
 
ArrayVector3 operator+ (Real fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator+ (Real fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator+ (Real fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator- (ArrayReal fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator- (ArrayReal fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator- (ArrayReal fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator- (const ArrayVector3 &lhs, ArrayReal fScalar)
 
ArrayVector3 operator- (const ArrayVector3 &lhs, ArrayReal fScalar)
 
ArrayVector3 operator- (const ArrayVector3 &lhs, ArrayReal fScalar)
 
ArrayVector3 operator- (const ArrayVector3 &lhs, const ArrayVector3 &rhs)
 
ArrayVector3 operator- (const ArrayVector3 &lhs, const ArrayVector3 &rhs)
 
ArrayVector3 operator- (const ArrayVector3 &lhs, const ArrayVector3 &rhs)
 
ArrayVector3 operator- (const ArrayVector3 &lhs, Real fScalar)
 
ArrayVector3 operator- (const ArrayVector3 &lhs, Real fScalar)
 
ArrayVector3 operator- (const ArrayVector3 &lhs, Real fScalar)
 
ArrayVector3 operator- (Real fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator- (Real fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator- (Real fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator/ (ArrayReal fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator/ (ArrayReal fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator/ (ArrayReal fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator/ (const ArrayVector3 &lhs, ArrayReal fScalar)
 
ArrayVector3 operator/ (const ArrayVector3 &lhs, ArrayReal fScalar)
 
ArrayVector3 operator/ (const ArrayVector3 &lhs, ArrayReal fScalar)
 
ArrayVector3 operator/ (const ArrayVector3 &lhs, const ArrayVector3 &rhs)
 
ArrayVector3 operator/ (const ArrayVector3 &lhs, const ArrayVector3 &rhs)
 
ArrayVector3 operator/ (const ArrayVector3 &lhs, const ArrayVector3 &rhs)
 
ArrayVector3 operator/ (const ArrayVector3 &lhs, Real fScalar)
 
ArrayVector3 operator/ (const ArrayVector3 &lhs, Real fScalar)
 
ArrayVector3 operator/ (const ArrayVector3 &lhs, Real fScalar)
 
ArrayVector3 operator/ (Real fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator/ (Real fScalar, const ArrayVector3 &rhs)
 
ArrayVector3 operator/ (Real fScalar, const ArrayVector3 &rhs)
 

Detailed Description

Cache-friendly array of 3-dimensional represented as a SoA array.

Remarks
ArrayVector3 is a SIMD & cache-friendly version of Vector3. An operation on an ArrayVector3 is done on 4 vectors 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 + 3 XXXX YYYY ZZZZ XXXX YYYY ZZZZ Extracting one vector (XYZ) needs 48 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

◆ ArrayVector3() [1/6]

Ogre::ArrayVector3::ArrayVector3 ( )
inline

◆ ArrayVector3() [2/6]

Ogre::ArrayVector3::ArrayVector3 ( ArrayReal  chunkX,
ArrayReal  chunkY,
ArrayReal  chunkZ 
)
inline

◆ ArrayVector3() [3/6]

Ogre::ArrayVector3::ArrayVector3 ( )
inline

◆ ArrayVector3() [4/6]

Ogre::ArrayVector3::ArrayVector3 ( ArrayReal  chunkX,
ArrayReal  chunkY,
ArrayReal  chunkZ 
)
inline

◆ ArrayVector3() [5/6]

Ogre::ArrayVector3::ArrayVector3 ( )
inline

◆ ArrayVector3() [6/6]

Ogre::ArrayVector3::ArrayVector3 ( ArrayReal  chunkX,
ArrayReal  chunkY,
ArrayReal  chunkZ 
)
inline

Member Function Documentation

◆ absDotProduct() [1/3]

ArrayReal Ogre::ArrayVector3::absDotProduct ( const ArrayVector3 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.

◆ absDotProduct() [2/3]

ArrayReal Ogre::ArrayVector3::absDotProduct ( const ArrayVector3 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.

◆ absDotProduct() [3/3]

ArrayReal Ogre::ArrayVector3::absDotProduct ( const ArrayVector3 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.

◆ Cmov4() [1/6]

void Ogre::ArrayVector3::Cmov4 ( ArrayMaskR  mask,
const ArrayVector3 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 ArrayVector3s, i.e. a = Cmov4( b, c ) then
See also
Cmov4( const ArrayVector3 &arg1, const ArrayVector3 &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::ArrayVector3::Cmov4 ( ArrayMaskR  mask,
const ArrayVector3 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 ArrayVector3s, i.e. a = Cmov4( b, c ) then
See also
Cmov4( const ArrayVector3 &arg1, const ArrayVector3 &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::ArrayVector3::Cmov4 ( ArrayMaskR  mask,
const ArrayVector3 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 ArrayVector3s, i.e. a = Cmov4( b, c ) then
See also
Cmov4( const ArrayVector3 &arg1, const ArrayVector3 &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 ArrayVector3 Ogre::ArrayVector3::Cmov4 ( const ArrayVector3 arg1,
const ArrayVector3 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 ArrayVector3 &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 ArrayVector3 Ogre::ArrayVector3::Cmov4 ( const ArrayVector3 arg1,
const ArrayVector3 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 ArrayVector3 &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 ArrayVector3 Ogre::ArrayVector3::Cmov4 ( const ArrayVector3 arg1,
const ArrayVector3 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 ArrayVector3 &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]

◆ CmovRobust() [1/3]

void Ogre::ArrayVector3::CmovRobust ( ArrayMaskR  mask,
const ArrayVector3 replacement 
)
inline

Conditional move update.

@See MathlibC::CmovRobust 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 = CmovRobust( a, b ) If this vector hasn't been assigned yet any value and want to decide between two ArrayVector3s, i.e. a = Cmov4( b, c ) then
See also
Cmov4( const ArrayVector3 &arg1, const ArrayVector3 &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]

◆ CmovRobust() [2/3]

void Ogre::ArrayVector3::CmovRobust ( ArrayMaskR  mask,
const ArrayVector3 replacement 
)
inline

Conditional move update.

@See MathlibNEON::CmovRobust 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 = CmovRobust( a, b ) If this vector hasn't been assigned yet any value and want to decide between two ArrayVector3s, i.e. a = Cmov4( b, c ) then
See also
Cmov4( const ArrayVector3 &arg1, const ArrayVector3 &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]

◆ CmovRobust() [3/3]

void Ogre::ArrayVector3::CmovRobust ( ArrayMaskR  mask,
const ArrayVector3 replacement 
)
inline

Conditional move update.

@See MathlibSSE2::CmovRobust 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 = CmovRobust( a, b ) If this vector hasn't been assigned yet any value and want to decide between two ArrayVector3s, i.e. a = Cmov4( b, c ) then
See also
Cmov4( const ArrayVector3 &arg1, const ArrayVector3 &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]

◆ collapseMax() [1/3]

Vector3 Ogre::ArrayVector3::collapseMax ( void  ) const
inline

Takes each Vector and returns one returns a single vector.

Remarks
This is useful when calculating bounding boxes, since it can be done independently in SIMD form, and once it is done, merge the results from the simd vectors into one
Returns
Vector.x = max( vector[0].x, vector[1].x, vector[2].x, vector[3].x ) Vector.y = max( vector[0].y, vector[1].y, vector[2].y, vector[3].y ) Vector.z = max( vector[0].z, vector[1].z, vector[2].z, vector[3].z )

◆ collapseMax() [2/3]

Vector3 Ogre::ArrayVector3::collapseMax ( void  ) const
inline

Takes each Vector and returns one returns a single vector.

Remarks
This is useful when calculating bounding boxes, since it can be done independently in SIMD form, and once it is done, merge the results from the simd vectors into one
Returns
Vector.x = max( vector[0].x, vector[1].x, vector[2].x, vector[3].x ) Vector.y = max( vector[0].y, vector[1].y, vector[2].y, vector[3].y ) Vector.z = max( vector[0].z, vector[1].z, vector[2].z, vector[3].z )

◆ collapseMax() [3/3]

Vector3 Ogre::ArrayVector3::collapseMax ( void  ) const
inline

Takes each Vector and returns one returns a single vector.

Remarks
This is useful when calculating bounding boxes, since it can be done independently in SIMD form, and once it is done, merge the results from the simd vectors into one
Returns
Vector.x = max( vector[0].x, vector[1].x, vector[2].x, vector[3].x ) Vector.y = max( vector[0].y, vector[1].y, vector[2].y, vector[3].y ) Vector.z = max( vector[0].z, vector[1].z, vector[2].z, vector[3].z )

◆ collapseMin() [1/3]

Vector3 Ogre::ArrayVector3::collapseMin ( void  ) const
inline

Takes each Vector and returns one returns a single vector.

Remarks
This is useful when calculating bounding boxes, since it can be done independently in SIMD form, and once it is done, merge the results from the simd vectors into one
Returns
Vector.x = min( vector[0].x, vector[1].x, vector[2].x, vector[3].x ) Vector.y = min( vector[0].y, vector[1].y, vector[2].y, vector[3].y ) Vector.z = min( vector[0].z, vector[1].z, vector[2].z, vector[3].z )

◆ collapseMin() [2/3]

Vector3 Ogre::ArrayVector3::collapseMin ( void  ) const
inline

Takes each Vector and returns one returns a single vector.

Remarks
This is useful when calculating bounding boxes, since it can be done independently in SIMD form, and once it is done, merge the results from the simd vectors into one
Returns
Vector.x = min( vector[0].x, vector[1].x, vector[2].x, vector[3].x ) Vector.y = min( vector[0].y, vector[1].y, vector[2].y, vector[3].y ) Vector.z = min( vector[0].z, vector[1].z, vector[2].z, vector[3].z )

◆ collapseMin() [3/3]

Vector3 Ogre::ArrayVector3::collapseMin ( void  ) const
inline

Takes each Vector and returns one returns a single vector.

Remarks
This is useful when calculating bounding boxes, since it can be done independently in SIMD form, and once it is done, merge the results from the simd vectors into one
Returns
Vector.x = min( vector[0].x, vector[1].x, vector[2].x, vector[3].x ) Vector.y = min( vector[0].y, vector[1].y, vector[2].y, vector[3].y ) Vector.z = min( vector[0].z, vector[1].z, vector[2].z, vector[3].z )

◆ crossProduct() [1/3]

ArrayVector3 Ogre::ArrayVector3::crossProduct ( const ArrayVector3 rkVector) const
inline

Calculates the cross-product of 2 vectors, i.e.

the vector that lies perpendicular to them both.

Remarks
The cross-product is normally used to calculate the normal vector of a plane, by calculating the cross-product of 2 non-equivalent vectors which lie on the plane (e.g. 2 edges of a triangle).
Parameters
rkVectorVector which, together with this one, will be used to calculate the cross-product.
Returns
A vector which is the result of the cross-product. This vector will NOT be normalised, to maximise efficiency
  • call Vector3::normalise on the result if you wish this to be done. As for which side the resultant vector will be on, the returned vector will be on the side from which the arc from 'this' to rkVector is anticlockwise, e.g. UNIT_Y.crossProduct(UNIT_Z) = UNIT_X, whilst UNIT_Z.crossProduct(UNIT_Y) = -UNIT_X. This is because OGRE uses a right-handed coordinate system.
For a clearer explanation, look a the left and the bottom edges of your monitor's screen. Assume that the first vector is the left edge and the second vector is the bottom edge, both of them starting from the lower-left corner of the screen. The resulting vector is going to be perpendicular to both of them and will go inside the screen, towards the cathode tube (assuming you're using a CRT monitor, of course).

◆ crossProduct() [2/3]

ArrayVector3 Ogre::ArrayVector3::crossProduct ( const ArrayVector3 rkVector) const
inline

Calculates the cross-product of 2 vectors, i.e.

the vector that lies perpendicular to them both.

Remarks
The cross-product is normally used to calculate the normal vector of a plane, by calculating the cross-product of 2 non-equivalent vectors which lie on the plane (e.g. 2 edges of a triangle).
Parameters
rkVectorVector which, together with this one, will be used to calculate the cross-product.
Returns
A vector which is the result of the cross-product. This vector will NOT be normalised, to maximise efficiency
  • call Vector3::normalise on the result if you wish this to be done. As for which side the resultant vector will be on, the returned vector will be on the side from which the arc from 'this' to rkVector is anticlockwise, e.g. UNIT_Y.crossProduct(UNIT_Z) = UNIT_X, whilst UNIT_Z.crossProduct(UNIT_Y) = -UNIT_X. This is because OGRE uses a right-handed coordinate system.
For a clearer explanation, look a the left and the bottom edges of your monitor's screen. Assume that the first vector is the left edge and the second vector is the bottom edge, both of them starting from the lower-left corner of the screen. The resulting vector is going to be perpendicular to both of them and will go inside the screen, towards the cathode tube (assuming you're using a CRT monitor, of course).

◆ crossProduct() [3/3]

ArrayVector3 Ogre::ArrayVector3::crossProduct ( const ArrayVector3 rkVector) const
inline

Calculates the cross-product of 2 vectors, i.e.

the vector that lies perpendicular to them both.

Remarks
The cross-product is normally used to calculate the normal vector of a plane, by calculating the cross-product of 2 non-equivalent vectors which lie on the plane (e.g. 2 edges of a triangle).
Parameters
rkVectorVector which, together with this one, will be used to calculate the cross-product.
Returns
A vector which is the result of the cross-product. This vector will NOT be normalised, to maximise efficiency
  • call Vector3::normalise on the result if you wish this to be done. As for which side the resultant vector will be on, the returned vector will be on the side from which the arc from 'this' to rkVector is anticlockwise, e.g. UNIT_Y.crossProduct(UNIT_Z) = UNIT_X, whilst UNIT_Z.crossProduct(UNIT_Y) = -UNIT_X. This is because OGRE uses a right-handed coordinate system.
For a clearer explanation, look a the left and the bottom edges of your monitor's screen. Assume that the first vector is the left edge and the second vector is the bottom edge, both of them starting from the lower-left corner of the screen. The resulting vector is going to be perpendicular to both of them and will go inside the screen, towards the cathode tube (assuming you're using a CRT monitor, of course).

◆ distance() [1/3]

ArrayReal Ogre::ArrayVector3::distance ( const ArrayVector3 rhs) const
inline

Returns the distance to another vector.

Warning
This operation requires a square root and is expensive in terms of CPU operations. If you don't need to know the exact distance (e.g. for just comparing distances) use squaredDistance() instead.

◆ distance() [2/3]

ArrayReal Ogre::ArrayVector3::distance ( const ArrayVector3 rhs) const
inline

Returns the distance to another vector.

Warning
This operation requires a square root and is expensive in terms of CPU operations. If you don't need to know the exact distance (e.g. for just comparing distances) use squaredDistance() instead.

◆ distance() [3/3]

ArrayReal Ogre::ArrayVector3::distance ( const ArrayVector3 rhs) const
inline

Returns the distance to another vector.

Warning
This operation requires a square root and is expensive in terms of CPU operations. If you don't need to know the exact distance (e.g. for just comparing distances) use squaredDistance() instead.

◆ dotProduct() [1/3]

ArrayReal Ogre::ArrayVector3::dotProduct ( const ArrayVector3 vec) const
inline

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

Remarks
The dot product can be used to calculate the angle between 2 vectors. If both are unit vectors, the dot product is the cosine of the angle; otherwise the dot product must be divided by the product of the lengths of both vectors to get the cosine of the angle. This result can further be used to calculate the distance of a point from a plane.
Parameters
vecVector with which to calculate the dot product (together with this one).
Returns
A float representing the dot product value.

◆ dotProduct() [2/3]

ArrayReal Ogre::ArrayVector3::dotProduct ( const ArrayVector3 vec) const
inline

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

Remarks
The dot product can be used to calculate the angle between 2 vectors. If both are unit vectors, the dot product is the cosine of the angle; otherwise the dot product must be divided by the product of the lengths of both vectors to get the cosine of the angle. This result can further be used to calculate the distance of a point from a plane.
Parameters
vecVector with which to calculate the dot product (together with this one).
Returns
A float representing the dot product value.

◆ dotProduct() [3/3]

ArrayReal Ogre::ArrayVector3::dotProduct ( const ArrayVector3 vec) const
inline

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

Remarks
The dot product can be used to calculate the angle between 2 vectors. If both are unit vectors, the dot product is the cosine of the angle; otherwise the dot product must be divided by the product of the lengths of both vectors to get the cosine of the angle. This result can further be used to calculate the distance of a point from a plane.
Parameters
vecVector with which to calculate the dot product (together with this one).
Returns
A float representing the dot product value.

◆ getAsVector3() [1/6]

Vector3 Ogre::ArrayVector3::getAsVector3 ( size_t  index) const
inline

Prefer using.

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

References ARRAY_PACKED_REALS.

◆ getAsVector3() [2/6]

Vector3 Ogre::ArrayVector3::getAsVector3 ( size_t  index) const
inline

Prefer using.

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

References ARRAY_PACKED_REALS.

◆ getAsVector3() [3/6]

Vector3 Ogre::ArrayVector3::getAsVector3 ( size_t  index) const
inline

Prefer using.

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

References ARRAY_PACKED_REALS.

◆ getAsVector3() [4/6]

void Ogre::ArrayVector3::getAsVector3 ( Vector3 out,
size_t  index 
) const
inline

◆ getAsVector3() [5/6]

void Ogre::ArrayVector3::getAsVector3 ( Vector3 out,
size_t  index 
) const
inline

References ARRAY_PACKED_REALS.

◆ getAsVector3() [6/6]

void Ogre::ArrayVector3::getAsVector3 ( Vector3 out,
size_t  index 
) const
inline

References ARRAY_PACKED_REALS.

◆ getMaxComponent() [1/3]

ArrayReal Ogre::ArrayVector3::getMaxComponent ( ) const
inline

Returns the biggest value between x, y, z; max( x, y, z )

◆ getMaxComponent() [2/3]

ArrayReal Ogre::ArrayVector3::getMaxComponent ( ) const
inline

Returns the biggest value between x, y, z; max( x, y, z )

◆ getMaxComponent() [3/3]

ArrayReal Ogre::ArrayVector3::getMaxComponent ( ) const
inline

Returns the biggest value between x, y, z; max( x, y, z )

◆ getMinComponent() [1/3]

ArrayReal Ogre::ArrayVector3::getMinComponent ( ) const
inline

Returns the smallest value between x, y, z; min( x, y, z )

◆ getMinComponent() [2/3]

ArrayReal Ogre::ArrayVector3::getMinComponent ( ) const
inline

Returns the smallest value between x, y, z; min( x, y, z )

◆ getMinComponent() [3/3]

ArrayReal Ogre::ArrayVector3::getMinComponent ( ) const
inline

Returns the smallest value between x, y, z; min( x, y, z )

◆ inverseLeaveZeroes() [1/3]

void Ogre::ArrayVector3::inverseLeaveZeroes ( void  )
inline

Calculates the inverse of the vectors: 1.0f / v; But if original is zero, the zero is left (0 / 0 = 0).

Example: Bfore inverseLeaveZero: x = 0; y = 2; z = 3; After inverseLeaveZero x = 0; y = 0.5; z = 0.3333;

◆ inverseLeaveZeroes() [2/3]

void Ogre::ArrayVector3::inverseLeaveZeroes ( void  )
inline

Calculates the inverse of the vectors: 1.0f / v; But if original is zero, the zero is left (0 / 0 = 0).

Example: Bfore inverseLeaveZero: x = 0; y = 2; z = 3; After inverseLeaveZero x = 0; y = 0.5; z = 0.3333;

◆ inverseLeaveZeroes() [3/3]

void Ogre::ArrayVector3::inverseLeaveZeroes ( void  )
inline

Calculates the inverse of the vectors: 1.0f / v; But if original is zero, the zero is left (0 / 0 = 0).

Example: Bfore inverseLeaveZero: x = 0; y = 2; z = 3; After inverseLeaveZero x = 0; y = 0.5; z = 0.3333;

◆ isNaN() [1/3]

int Ogre::ArrayVector3::isNaN ( void  ) const
inline
See also
Vector3::isNaN()
Returns
Return value differs from Vector3's counterpart. We return an int bits 0-4 are set for each NaN of each vector inside. if the int is non-zero, there is a NaN.

◆ isNaN() [2/3]

int Ogre::ArrayVector3::isNaN ( void  ) const
inline
See also
Vector3::isNaN()
Returns
Return value differs from Vector3's counterpart. We return an int bits 0-4 are set for each NaN of each vector inside. if the int is non-zero, there is a NaN.

◆ isNaN() [3/3]

int Ogre::ArrayVector3::isNaN ( void  ) const
inline
See also
Vector3::isNaN()
Returns
Return value differs from Vector3's counterpart. We return an int bits 0-4 are set for each NaN of each vector inside. if the int is non-zero, there is a NaN.

◆ length() [1/3]

ArrayReal Ogre::ArrayVector3::length ( ) const
inline

Returns the length (magnitude) of the vector.

Warning
This operation requires a square root and is expensive in terms of CPU operations. If you don't need to know the exact length (e.g. for just comparing lengths) use squaredLength() instead.

◆ length() [2/3]

ArrayReal Ogre::ArrayVector3::length ( ) const
inline

Returns the length (magnitude) of the vector.

Warning
This operation requires a square root and is expensive in terms of CPU operations. If you don't need to know the exact length (e.g. for just comparing lengths) use squaredLength() instead.

◆ length() [3/3]

ArrayReal Ogre::ArrayVector3::length ( ) const
inline

Returns the length (magnitude) of the vector.

Warning
This operation requires a square root and is expensive in terms of CPU operations. If you don't need to know the exact length (e.g. for just comparing lengths) use squaredLength() instead.

◆ loadFromAoS() [1/3]

void Ogre::ArrayVector3::loadFromAoS ( const Real *RESTRICT_ALIAS  src)
inline

Converts 4 ARRAY_PACKED_REALS reals into this ArrayVector3.

Remarks
'src' must be aligned and assumed to have enough memory for ARRAY_PACKED_REALS Vector3 @See Frustum::getCustomWorldSpaceCorners implementation for an actual, advanced use case.

◆ loadFromAoS() [2/3]

void Ogre::ArrayVector3::loadFromAoS ( const Real *RESTRICT_ALIAS  src)
inline

Converts 4 ARRAY_PACKED_REALS reals into this ArrayVector3.

Remarks
'src' must be aligned and assumed to have enough memory for ARRAY_PACKED_REALS Vector3 i.e. on SSE2 you can construct src as: OGRE_ALIGNED_DECL( Real, vals[ARRAY_PACKED_REALS * 4], OGRE_SIMD_ALIGNMENT ) = { x0, y0, z0, 0, x1, y1, z1, 0, x2, y2, z2, 0, x3, y3, z3, 0, } @See Frustum::getCustomWorldSpaceCorners implementation for an actual, advanced use case.

◆ loadFromAoS() [3/3]

void Ogre::ArrayVector3::loadFromAoS ( const Real *RESTRICT_ALIAS  src)
inline

Converts 4 ARRAY_PACKED_REALS reals into this ArrayVector3.

Remarks
'src' must be aligned and assumed to have enough memory for ARRAY_PACKED_REALS Vector3 i.e. on SSE2 you can construct src as: OGRE_ALIGNED_DECL( Real, vals[ARRAY_PACKED_REALS * 4], OGRE_SIMD_ALIGNMENT ) = { x0, y0, z0, 0, x1, y1, z1, 0, x2, y2, z2, 0, x3, y3, z3, 0, } @See Frustum::getCustomWorldSpaceCorners implementation for an actual, advanced use case.

◆ makeCeil() [1/3]

void Ogre::ArrayVector3::makeCeil ( const ArrayVector3 cmp)
inline

Sets this vector's components to the maximum of its own and the ones of the passed in vector.

Remarks
'Maximum' in this case means the combination of the highest value of x, y and z from both vectors. Highest is taken just numerically, not magnitude, so 1 > -3.

◆ makeCeil() [2/3]

void Ogre::ArrayVector3::makeCeil ( const ArrayVector3 cmp)
inline

Sets this vector's components to the maximum of its own and the ones of the passed in vector.

Remarks
'Maximum' in this case means the combination of the highest value of x, y and z from both vectors. Highest is taken just numerically, not magnitude, so 1 > -3.

◆ makeCeil() [3/3]

void Ogre::ArrayVector3::makeCeil ( const ArrayVector3 cmp)
inline

Sets this vector's components to the maximum of its own and the ones of the passed in vector.

Remarks
'Maximum' in this case means the combination of the highest value of x, y and z from both vectors. Highest is taken just numerically, not magnitude, so 1 > -3.

◆ makeFloor() [1/3]

void Ogre::ArrayVector3::makeFloor ( const ArrayVector3 cmp)
inline

Sets this vector's components to the minimum of its own and the ones of the passed in vector.

Remarks
'Minimum' in this case means the combination of the lowest value of x, y and z from both vectors. Lowest is taken just numerically, not magnitude, so -1 < 0.

◆ makeFloor() [2/3]

void Ogre::ArrayVector3::makeFloor ( const ArrayVector3 cmp)
inline

Sets this vector's components to the minimum of its own and the ones of the passed in vector.

Remarks
'Minimum' in this case means the combination of the lowest value of x, y and z from both vectors. Lowest is taken just numerically, not magnitude, so -1 < 0.

◆ makeFloor() [3/3]

void Ogre::ArrayVector3::makeFloor ( const ArrayVector3 cmp)
inline

Sets this vector's components to the minimum of its own and the ones of the passed in vector.

Remarks
'Minimum' in this case means the combination of the lowest value of x, y and z from both vectors. Lowest is taken just numerically, not magnitude, so -1 < 0.

◆ midPoint() [1/3]

ArrayVector3 Ogre::ArrayVector3::midPoint ( const ArrayVector3 vec) const
inline

Returns a vector at a point half way between this and the passed in vector.

◆ midPoint() [2/3]

ArrayVector3 Ogre::ArrayVector3::midPoint ( const ArrayVector3 vec) const
inline

Returns a vector at a point half way between this and the passed in vector.

◆ midPoint() [3/3]

ArrayVector3 Ogre::ArrayVector3::midPoint ( const ArrayVector3 vec) const
inline

Returns a vector at a point half way between this and the passed in vector.

◆ normalise() [1/3]

void Ogre::ArrayVector3::normalise ( void  )
inline

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

See also
Vector3::normalise()

◆ normalise() [2/3]

void Ogre::ArrayVector3::normalise ( void  )
inline

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

See also
Vector3::normalise()

◆ normalise() [3/3]

void Ogre::ArrayVector3::normalise ( void  )
inline

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

See also
Vector3::normalise()

◆ normalisedCopy() [1/3]

ArrayVector3 Ogre::ArrayVector3::normalisedCopy ( void  ) const
inline

As normalise, except that this vector is unaffected and the normalised vector is returned as a copy.

◆ normalisedCopy() [2/3]

ArrayVector3 Ogre::ArrayVector3::normalisedCopy ( void  ) const
inline

As normalise, except that this vector is unaffected and the normalised vector is returned as a copy.

◆ normalisedCopy() [3/3]

ArrayVector3 Ogre::ArrayVector3::normalisedCopy ( void  ) const
inline

As normalise, except that this vector is unaffected and the normalised vector is returned as a copy.

◆ operator*=() [1/8]

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

◆ operator*=() [2/8]

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

◆ operator*=() [3/8]

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

◆ operator*=() [4/8]

void Ogre::ArrayVector3::operator*= ( const ArrayVector3 a)
inline

◆ operator*=() [5/8]

void Ogre::ArrayVector3::operator*= ( const ArrayVector3 a)
inline

◆ operator*=() [6/8]

void Ogre::ArrayVector3::operator*= ( const ArrayVector3 a)
inline

◆ operator*=() [7/8]

void Ogre::ArrayVector3::operator*= ( const Real  fScalar)
inline

◆ operator*=() [8/8]

void Ogre::ArrayVector3::operator*= ( const Real  fScalar)
inline

◆ operator+() [1/3]

const ArrayVector3 & Ogre::ArrayVector3::operator+ ( ) const
inline

◆ operator+() [2/3]

const ArrayVector3 & Ogre::ArrayVector3::operator+ ( ) const
inline

◆ operator+() [3/3]

const ArrayVector3 & Ogre::ArrayVector3::operator+ ( ) const
inline

◆ operator+=() [1/8]

void Ogre::ArrayVector3::operator+= ( const ArrayReal  fScalar)
inline

◆ operator+=() [2/8]

void Ogre::ArrayVector3::operator+= ( const ArrayReal  fScalar)
inline

◆ operator+=() [3/8]

void Ogre::ArrayVector3::operator+= ( const ArrayReal  fScalar)
inline

◆ operator+=() [4/8]

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

◆ operator+=() [5/8]

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

◆ operator+=() [6/8]

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

◆ operator+=() [7/8]

void Ogre::ArrayVector3::operator+= ( const Real  fScalar)
inline

◆ operator+=() [8/8]

void Ogre::ArrayVector3::operator+= ( const Real  fScalar)
inline

◆ operator-() [1/3]

ArrayVector3 Ogre::ArrayVector3::operator- ( ) const
inline

◆ operator-() [2/3]

ArrayVector3 Ogre::ArrayVector3::operator- ( ) const
inline

◆ operator-() [3/3]

ArrayVector3 Ogre::ArrayVector3::operator- ( ) const
inline

◆ operator-=() [1/8]

void Ogre::ArrayVector3::operator-= ( const ArrayReal  fScalar)
inline

◆ operator-=() [2/8]

void Ogre::ArrayVector3::operator-= ( const ArrayReal  fScalar)
inline

◆ operator-=() [3/8]

void Ogre::ArrayVector3::operator-= ( const ArrayReal  fScalar)
inline

◆ operator-=() [4/8]

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

◆ operator-=() [5/8]

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

◆ operator-=() [6/8]

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

◆ operator-=() [7/8]

void Ogre::ArrayVector3::operator-= ( const Real  fScalar)
inline

◆ operator-=() [8/8]

void Ogre::ArrayVector3::operator-= ( const Real  fScalar)
inline

◆ operator/=() [1/8]

void Ogre::ArrayVector3::operator/= ( const ArrayReal  fScalar)
inline

◆ operator/=() [2/8]

void Ogre::ArrayVector3::operator/= ( const ArrayReal  fScalar)
inline

◆ operator/=() [3/8]

void Ogre::ArrayVector3::operator/= ( const ArrayReal  fScalar)
inline

◆ operator/=() [4/8]

void Ogre::ArrayVector3::operator/= ( const ArrayVector3 a)
inline

◆ operator/=() [5/8]

void Ogre::ArrayVector3::operator/= ( const ArrayVector3 a)
inline

◆ operator/=() [6/8]

void Ogre::ArrayVector3::operator/= ( const ArrayVector3 a)
inline

◆ operator/=() [7/8]

void Ogre::ArrayVector3::operator/= ( const Real  fScalar)
inline

◆ operator/=() [8/8]

void Ogre::ArrayVector3::operator/= ( const Real  fScalar)
inline

◆ operator=() [1/3]

ArrayVector3 & Ogre::ArrayVector3::operator= ( const Real  fScalar)
inline

Copies only one vector, by looking at the indexes.

◆ operator=() [2/3]

ArrayVector3 & Ogre::ArrayVector3::operator= ( const Real  fScalar)
inline

Copies only one vector, by looking at the indexes.

◆ operator=() [3/3]

ArrayVector3 & Ogre::ArrayVector3::operator= ( const Real  fScalar)
inline

Copies only one vector, by looking at the indexes.

◆ perpendicular() [1/3]

ArrayVector3 Ogre::ArrayVector3::perpendicular ( void  ) const
inline

Generates a vector perpendicular to this vector (eg an 'up' vector).

Remarks
This method will return a vector which is perpendicular to this vector. There are an infinite number of possibilities but this method will guarantee to generate one of them. If you need more control you should use the Quaternion class.

◆ perpendicular() [2/3]

ArrayVector3 Ogre::ArrayVector3::perpendicular ( void  ) const
inline

Generates a vector perpendicular to this vector (eg an 'up' vector).

Remarks
This method will return a vector which is perpendicular to this vector. There are an infinite number of possibilities but this method will guarantee to generate one of them. If you need more control you should use the Quaternion class.

◆ perpendicular() [3/3]

ArrayVector3 Ogre::ArrayVector3::perpendicular ( void  ) const
inline

Generates a vector perpendicular to this vector (eg an 'up' vector).

Remarks
This method will return a vector which is perpendicular to this vector. There are an infinite number of possibilities but this method will guarantee to generate one of them. If you need more control you should use the Quaternion class.

◆ primaryAxis() [1/3]

ArrayVector3 Ogre::ArrayVector3::primaryAxis ( void  ) const
inline

Extract the primary (dominant) axis from this direction vector.

◆ primaryAxis() [2/3]

ArrayVector3 Ogre::ArrayVector3::primaryAxis ( void  ) const
inline

Extract the primary (dominant) axis from this direction vector.

◆ primaryAxis() [3/3]

ArrayVector3 Ogre::ArrayVector3::primaryAxis ( void  ) const
inline

Extract the primary (dominant) axis from this direction vector.

◆ reflect() [1/3]

ArrayVector3 Ogre::ArrayVector3::reflect ( const ArrayVector3 normal) const
inline

Calculates a reflection vector to the plane with the given normal .

Remarks
NB assumes 'this' is pointing AWAY FROM the plane, invert if it is not.

◆ reflect() [2/3]

ArrayVector3 Ogre::ArrayVector3::reflect ( const ArrayVector3 normal) const
inline

Calculates a reflection vector to the plane with the given normal .

Remarks
NB assumes 'this' is pointing AWAY FROM the plane, invert if it is not.

◆ reflect() [3/3]

ArrayVector3 Ogre::ArrayVector3::reflect ( const ArrayVector3 normal) const
inline

Calculates a reflection vector to the plane with the given normal .

Remarks
NB assumes 'this' is pointing AWAY FROM the plane, invert if it is not.

◆ setAll() [1/3]

void Ogre::ArrayVector3::setAll ( const Vector3 v)
inline

Sets all packed vectors to the same value as the scalar input vector.

Referenced by Ogre::ArrayAabb::setAll().

◆ setAll() [2/3]

void Ogre::ArrayVector3::setAll ( const Vector3 v)
inline

Sets all packed vectors to the same value as the scalar input vector.

◆ setAll() [3/3]

void Ogre::ArrayVector3::setAll ( const Vector3 v)
inline

Sets all packed vectors to the same value as the scalar input vector.

◆ setFromVector3() [1/3]

void Ogre::ArrayVector3::setFromVector3 ( const Vector3 v,
size_t  index 
)
inline

◆ setFromVector3() [2/3]

void Ogre::ArrayVector3::setFromVector3 ( const Vector3 v,
size_t  index 
)
inline

References ARRAY_PACKED_REALS.

◆ setFromVector3() [3/3]

void Ogre::ArrayVector3::setFromVector3 ( const Vector3 v,
size_t  index 
)
inline

References ARRAY_PACKED_REALS.

◆ setToSign() [1/3]

void Ogre::ArrayVector3::setToSign ( )
inline

Converts the vector to (sign(x), sign(y), sign(z))

Remarks
For reference, sign( x ) = x >= 0 ? 1.0 : -1.0 sign( -0.0f ) may return 1 or -1 depending on implementation
SSE2 implementation: Does distinguish between -0 & 0 C implementation: Does not distinguish between -0 & 0

◆ setToSign() [2/3]

void Ogre::ArrayVector3::setToSign ( )
inline

Converts the vector to (sign(x), sign(y), sign(z))

Remarks
For reference, sign( x ) = x >= 0 ? 1.0 : -1.0 sign( -0.0f ) may return 1 or -1 depending on implementation
SSE2 implementation: Does distinguish between -0 & 0 C implementation: Does not distinguish between -0 & 0

◆ setToSign() [3/3]

void Ogre::ArrayVector3::setToSign ( )
inline

Converts the vector to (sign(x), sign(y), sign(z))

Remarks
For reference, sign( x ) = x >= 0 ? 1.0 : -1.0 sign( -0.0f ) may return 1 or -1 depending on implementation
SSE2 implementation: Does distinguish between -0 & 0 C implementation: Does not distinguish between -0 & 0

◆ squaredDistance() [1/3]

ArrayReal Ogre::ArrayVector3::squaredDistance ( const ArrayVector3 rhs) const
inline

Returns the square of the distance to another vector.

Remarks
This method is for efficiency - calculating the actual distance to another vector requires a square root, which is expensive in terms of the operations required. This method returns the square of the distance to another vector, i.e. the same as the distance but before the square root is taken. Use this if you want to find the longest / shortest distance without incurring the square root.

◆ squaredDistance() [2/3]

ArrayReal Ogre::ArrayVector3::squaredDistance ( const ArrayVector3 rhs) const
inline

Returns the square of the distance to another vector.

Remarks
This method is for efficiency - calculating the actual distance to another vector requires a square root, which is expensive in terms of the operations required. This method returns the square of the distance to another vector, i.e. the same as the distance but before the square root is taken. Use this if you want to find the longest / shortest distance without incurring the square root.

◆ squaredDistance() [3/3]

ArrayReal Ogre::ArrayVector3::squaredDistance ( const ArrayVector3 rhs) const
inline

Returns the square of the distance to another vector.

Remarks
This method is for efficiency - calculating the actual distance to another vector requires a square root, which is expensive in terms of the operations required. This method returns the square of the distance to another vector, i.e. the same as the distance but before the square root is taken. Use this if you want to find the longest / shortest distance without incurring the square root.

◆ squaredLength() [1/3]

ArrayReal Ogre::ArrayVector3::squaredLength ( ) const
inline

Returns the square of the length(magnitude) of the vector.

Remarks
This method is for efficiency - calculating the actual length of a vector requires a square root, which is expensive in terms of the operations required. This method returns the square of the length of the vector, i.e. the same as the length but before the square root is taken. Use this if you want to find the longest / shortest vector without incurring the square root.

◆ squaredLength() [2/3]

ArrayReal Ogre::ArrayVector3::squaredLength ( ) const
inline

Returns the square of the length(magnitude) of the vector.

Remarks
This method is for efficiency - calculating the actual length of a vector requires a square root, which is expensive in terms of the operations required. This method returns the square of the length of the vector, i.e. the same as the length but before the square root is taken. Use this if you want to find the longest / shortest vector without incurring the square root.

◆ squaredLength() [3/3]

ArrayReal Ogre::ArrayVector3::squaredLength ( ) const
inline

Returns the square of the length(magnitude) of the vector.

Remarks
This method is for efficiency - calculating the actual length of a vector requires a square root, which is expensive in terms of the operations required. This method returns the square of the length of the vector, i.e. the same as the length but before the square root is taken. Use this if you want to find the longest / shortest vector without incurring the square root.

Friends And Related Symbol Documentation

◆ operator* [1/15]

ArrayVector3 operator* ( ArrayReal  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator* [2/15]

ArrayVector3 operator* ( ArrayReal  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator* [3/15]

ArrayVector3 operator* ( ArrayReal  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator* [4/15]

ArrayVector3 operator* ( const ArrayVector3 lhs,
ArrayReal  fScalar 
)
friend

◆ operator* [5/15]

ArrayVector3 operator* ( const ArrayVector3 lhs,
ArrayReal  fScalar 
)
friend

◆ operator* [6/15]

ArrayVector3 operator* ( const ArrayVector3 lhs,
ArrayReal  fScalar 
)
friend

◆ operator* [7/15]

ArrayVector3 operator* ( const ArrayVector3 lhs,
const ArrayVector3 rhs 
)
friend

◆ operator* [8/15]

ArrayVector3 operator* ( const ArrayVector3 lhs,
const ArrayVector3 rhs 
)
friend

◆ operator* [9/15]

ArrayVector3 operator* ( const ArrayVector3 lhs,
const ArrayVector3 rhs 
)
friend

◆ operator* [10/15]

ArrayVector3 operator* ( const ArrayVector3 lhs,
Real  fScalar 
)
friend

◆ operator* [11/15]

ArrayVector3 operator* ( const ArrayVector3 lhs,
Real  fScalar 
)
friend

◆ operator* [12/15]

ArrayVector3 operator* ( const ArrayVector3 lhs,
Real  fScalar 
)
friend

◆ operator* [13/15]

ArrayVector3 operator* ( Real  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator* [14/15]

ArrayVector3 operator* ( Real  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator* [15/15]

ArrayVector3 operator* ( Real  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator+ [1/15]

ArrayVector3 operator+ ( ArrayReal  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator+ [2/15]

ArrayVector3 operator+ ( ArrayReal  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator+ [3/15]

ArrayVector3 operator+ ( ArrayReal  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator+ [4/15]

ArrayVector3 operator+ ( const ArrayVector3 lhs,
ArrayReal  fScalar 
)
friend

◆ operator+ [5/15]

ArrayVector3 operator+ ( const ArrayVector3 lhs,
ArrayReal  fScalar 
)
friend

◆ operator+ [6/15]

ArrayVector3 operator+ ( const ArrayVector3 lhs,
ArrayReal  fScalar 
)
friend

◆ operator+ [7/15]

ArrayVector3 operator+ ( const ArrayVector3 lhs,
const ArrayVector3 rhs 
)
friend

◆ operator+ [8/15]

ArrayVector3 operator+ ( const ArrayVector3 lhs,
const ArrayVector3 rhs 
)
friend

◆ operator+ [9/15]

ArrayVector3 operator+ ( const ArrayVector3 lhs,
const ArrayVector3 rhs 
)
friend

◆ operator+ [10/15]

ArrayVector3 operator+ ( const ArrayVector3 lhs,
Real  fScalar 
)
friend

◆ operator+ [11/15]

ArrayVector3 operator+ ( const ArrayVector3 lhs,
Real  fScalar 
)
friend

◆ operator+ [12/15]

ArrayVector3 operator+ ( const ArrayVector3 lhs,
Real  fScalar 
)
friend

◆ operator+ [13/15]

ArrayVector3 operator+ ( Real  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator+ [14/15]

ArrayVector3 operator+ ( Real  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator+ [15/15]

ArrayVector3 operator+ ( Real  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator- [1/15]

ArrayVector3 operator- ( ArrayReal  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator- [2/15]

ArrayVector3 operator- ( ArrayReal  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator- [3/15]

ArrayVector3 operator- ( ArrayReal  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator- [4/15]

ArrayVector3 operator- ( const ArrayVector3 lhs,
ArrayReal  fScalar 
)
friend

◆ operator- [5/15]

ArrayVector3 operator- ( const ArrayVector3 lhs,
ArrayReal  fScalar 
)
friend

◆ operator- [6/15]

ArrayVector3 operator- ( const ArrayVector3 lhs,
ArrayReal  fScalar 
)
friend

◆ operator- [7/15]

ArrayVector3 operator- ( const ArrayVector3 lhs,
const ArrayVector3 rhs 
)
friend

◆ operator- [8/15]

ArrayVector3 operator- ( const ArrayVector3 lhs,
const ArrayVector3 rhs 
)
friend

◆ operator- [9/15]

ArrayVector3 operator- ( const ArrayVector3 lhs,
const ArrayVector3 rhs 
)
friend

◆ operator- [10/15]

ArrayVector3 operator- ( const ArrayVector3 lhs,
Real  fScalar 
)
friend

◆ operator- [11/15]

ArrayVector3 operator- ( const ArrayVector3 lhs,
Real  fScalar 
)
friend

◆ operator- [12/15]

ArrayVector3 operator- ( const ArrayVector3 lhs,
Real  fScalar 
)
friend

◆ operator- [13/15]

ArrayVector3 operator- ( Real  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator- [14/15]

ArrayVector3 operator- ( Real  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator- [15/15]

ArrayVector3 operator- ( Real  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator/ [1/15]

ArrayVector3 operator/ ( ArrayReal  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator/ [2/15]

ArrayVector3 operator/ ( ArrayReal  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator/ [3/15]

ArrayVector3 operator/ ( ArrayReal  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator/ [4/15]

ArrayVector3 operator/ ( const ArrayVector3 lhs,
ArrayReal  fScalar 
)
friend

◆ operator/ [5/15]

ArrayVector3 operator/ ( const ArrayVector3 lhs,
ArrayReal  fScalar 
)
friend

◆ operator/ [6/15]

ArrayVector3 operator/ ( const ArrayVector3 lhs,
ArrayReal  fScalar 
)
friend

◆ operator/ [7/15]

ArrayVector3 operator/ ( const ArrayVector3 lhs,
const ArrayVector3 rhs 
)
friend

◆ operator/ [8/15]

ArrayVector3 operator/ ( const ArrayVector3 lhs,
const ArrayVector3 rhs 
)
friend

◆ operator/ [9/15]

ArrayVector3 operator/ ( const ArrayVector3 lhs,
const ArrayVector3 rhs 
)
friend

◆ operator/ [10/15]

ArrayVector3 operator/ ( const ArrayVector3 lhs,
Real  fScalar 
)
friend

◆ operator/ [11/15]

ArrayVector3 operator/ ( const ArrayVector3 lhs,
Real  fScalar 
)
friend

◆ operator/ [12/15]

ArrayVector3 operator/ ( const ArrayVector3 lhs,
Real  fScalar 
)
friend

◆ operator/ [13/15]

ArrayVector3 operator/ ( Real  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator/ [14/15]

ArrayVector3 operator/ ( Real  fScalar,
const ArrayVector3 rhs 
)
friend

◆ operator/ [15/15]

ArrayVector3 operator/ ( Real  fScalar,
const ArrayVector3 rhs 
)
friend

Member Data Documentation

◆ mChunkBase

ArrayReal Ogre::ArrayVector3::mChunkBase

◆ NEGATIVE_UNIT_X

static const ArrayVector3 Ogre::ArrayVector3::NEGATIVE_UNIT_X
static

◆ NEGATIVE_UNIT_Y

static const ArrayVector3 Ogre::ArrayVector3::NEGATIVE_UNIT_Y
static

◆ NEGATIVE_UNIT_Z

static const ArrayVector3 Ogre::ArrayVector3::NEGATIVE_UNIT_Z
static

◆ UNIT_SCALE

static const ArrayVector3 Ogre::ArrayVector3::UNIT_SCALE
static

◆ UNIT_X

static const ArrayVector3 Ogre::ArrayVector3::UNIT_X
static

◆ UNIT_Y

static const ArrayVector3 Ogre::ArrayVector3::UNIT_Y
static

◆ UNIT_Z

static const ArrayVector3 Ogre::ArrayVector3::UNIT_Z
static

◆ ZERO

static const ArrayVector3 Ogre::ArrayVector3::ZERO
static

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