OGRE-Next
4.0.0unstable
Object-Oriented Graphics Rendering Engine
|
Represents the transform of a single object, arranged in SoA (Structure of Arrays) More...
#include <OgreTransform.h>
Public Member Functions | |
Transform () | |
void | advancePack () |
Advances all pointers to the next pack, i.e. More... | |
void | advancePack (size_t numAdvance) |
void | copy (const Transform &inCopy) |
Copies all the scalar data from the parameter into this. More... | |
void | rebasePtrs (const MemoryPoolVec &newBasePtrs, const ptrdiff_t diff) |
Rebases all the pointers from our SoA structs so that they point to a new location calculated from a base pointer, and a difference offset. More... | |
Public Attributes | |
ArrayQuaternion *RESTRICT_ALIAS | mDerivedOrientation |
Caches the combined orientation from all parent nodes. More... | |
ArrayVector3 *RESTRICT_ALIAS | mDerivedPosition |
Caches the combined position from all parent nodes. More... | |
ArrayVector3 *RESTRICT_ALIAS | mDerivedScale |
Caches the combined scale from all parent nodes. More... | |
Matrix4 *RESTRICT_ALIAS | mDerivedTransform |
Caches the full transform into a 4x4 matrix. Note it's not Array form! (It's AoS) More... | |
unsigned char | mIndex |
Which of the packed values is ours. Value in range [0; 4) for SSE2. More... | |
bool *RESTRICT_ALIAS | mInheritOrientation |
Stores whether this node inherits orientation from it's parent. More... | |
bool *RESTRICT_ALIAS | mInheritScale |
Stores whether this node inherits scale from it's parent. More... | |
ArrayQuaternion *RESTRICT_ALIAS | mOrientation |
Stores the orientation of a node relative to it's parent. More... | |
Node ** | mOwner |
The Node that owns this Transform. Ours is mOwner[mIndex]. More... | |
Node ** | mParents |
Holds the pointers to each parent. Ours is mParents[mIndex]. More... | |
ArrayVector3 *RESTRICT_ALIAS | mPosition |
Stores the position/translation of a node relative to its parent. More... | |
ArrayVector3 *RESTRICT_ALIAS | mScale |
Stores the scaling factor applied to a node. More... | |
Represents the transform of a single object, arranged in SoA (Structure of Arrays)
|
inline |
|
inline |
Advances all pointers to the next pack, i.e.
if we're processing 4 elements at a time, move to the next 4 elements.
References ARRAY_PACKED_REALS, mDerivedOrientation, mDerivedPosition, mDerivedScale, mDerivedTransform, mInheritOrientation, mInheritScale, mOrientation, mOwner, mParents, mPosition, and mScale.
|
inline |
|
inline |
Copies all the scalar data from the parameter into this.
Furthermore, it would be confusing, because it would be not clear whether those two options should memcpy memory, or rebase the pointers, hence explicit functions are much preferred.
Note that we do NOT copy the mIndex member.
References Ogre::ArrayQuaternion::getAsQuaternion(), Ogre::ArrayVector3::getAsVector3(), mDerivedOrientation, mDerivedPosition, mDerivedScale, mDerivedTransform, mIndex, mInheritOrientation, mInheritScale, mOrientation, mOwner, mParents, mPosition, mScale, Ogre::ArrayQuaternion::setFromQuaternion(), and Ogre::ArrayVector3::setFromVector3().
|
inline |
Rebases all the pointers from our SoA structs so that they point to a new location calculated from a base pointer, and a difference offset.
The index (i.e. mPosition._getIndex()) is assumed to stay the same
References Ogre::NodeArrayMemoryManager::DerivedOrientation, Ogre::NodeArrayMemoryManager::DerivedPosition, Ogre::NodeArrayMemoryManager::DerivedScale, Ogre::NodeArrayMemoryManager::InheritOrientation, Ogre::NodeArrayMemoryManager::InheritScale, mDerivedOrientation, mDerivedPosition, mDerivedScale, mDerivedTransform, mInheritOrientation, mInheritScale, mOrientation, mOwner, mParents, mPosition, mScale, Ogre::NodeArrayMemoryManager::Orientation, Ogre::NodeArrayMemoryManager::Owner, Ogre::NodeArrayMemoryManager::Parent, Ogre::NodeArrayMemoryManager::Position, Ogre::NodeArrayMemoryManager::Scale, and Ogre::NodeArrayMemoryManager::WorldMat.
ArrayQuaternion* RESTRICT_ALIAS Ogre::Transform::mDerivedOrientation |
Caches the combined orientation from all parent nodes.
Referenced by advancePack(), copy(), and rebasePtrs().
ArrayVector3* RESTRICT_ALIAS Ogre::Transform::mDerivedPosition |
Caches the combined position from all parent nodes.
Referenced by advancePack(), copy(), and rebasePtrs().
ArrayVector3* RESTRICT_ALIAS Ogre::Transform::mDerivedScale |
Caches the combined scale from all parent nodes.
Referenced by advancePack(), copy(), and rebasePtrs().
Matrix4* RESTRICT_ALIAS Ogre::Transform::mDerivedTransform |
Caches the full transform into a 4x4 matrix. Note it's not Array form! (It's AoS)
Referenced by Ogre::Node::_getFullTransform(), advancePack(), copy(), and rebasePtrs().
unsigned char Ogre::Transform::mIndex |
Which of the packed values is ours. Value in range [0; 4) for SSE2.
Referenced by Ogre::Node::_getFullTransform(), and copy().
bool* RESTRICT_ALIAS Ogre::Transform::mInheritOrientation |
Stores whether this node inherits orientation from it's parent.
Ours is mInheritOrientation[mIndex]
Referenced by advancePack(), copy(), and rebasePtrs().
bool* RESTRICT_ALIAS Ogre::Transform::mInheritScale |
Stores whether this node inherits scale from it's parent.
Ours is mInheritScale[mIndex]
Referenced by advancePack(), copy(), and rebasePtrs().
ArrayQuaternion* RESTRICT_ALIAS Ogre::Transform::mOrientation |
Stores the orientation of a node relative to it's parent.
Referenced by advancePack(), copy(), and rebasePtrs().
Node** Ogre::Transform::mOwner |
The Node that owns this Transform. Ours is mOwner[mIndex].
Referenced by advancePack(), copy(), and rebasePtrs().
Node** Ogre::Transform::mParents |
Holds the pointers to each parent. Ours is mParents[mIndex].
Referenced by advancePack(), copy(), and rebasePtrs().
ArrayVector3* RESTRICT_ALIAS Ogre::Transform::mPosition |
Stores the position/translation of a node relative to its parent.
Referenced by advancePack(), copy(), and rebasePtrs().
ArrayVector3* RESTRICT_ALIAS Ogre::Transform::mScale |
Stores the scaling factor applied to a node.
Referenced by advancePack(), copy(), and rebasePtrs().