OGRE 2.1
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. | |
void | advancePack (size_t numAdvance) |
void | copy (const Transform &inCopy) |
Copies all the scalar data from the parameter into this. | |
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. | |
Public Attributes | |
ArrayQuaternion *RESTRICT_ALIAS | mDerivedOrientation |
Caches the combined orientation from all parent nodes. | |
ArrayVector3 *RESTRICT_ALIAS | mDerivedPosition |
Caches the combined position from all parent nodes. | |
ArrayVector3 *RESTRICT_ALIAS | mDerivedScale |
Caches the combined scale from all parent nodes. | |
Matrix4 *RESTRICT_ALIAS | mDerivedTransform |
Caches the full transform into a 4x4 matrix. Note it's not Array form! (It's AoS) | |
unsigned char | mIndex |
Which of the packed values is ours. Value in range [0; 4) for SSE2. | |
bool *RESTRICT_ALIAS | mInheritOrientation |
Stores whether this node inherits orientation from it's parent. | |
bool *RESTRICT_ALIAS | mInheritScale |
Stores whether this node inherits scale from it's parent. | |
ArrayQuaternion *RESTRICT_ALIAS | mOrientation |
Stores the orientation of a node relative to it's parent. | |
Node ** | mOwner |
The Node that owns this Transform. Ours is mOwner[mIndex]. | |
Node ** | mParents |
Holds the pointers to each parent. Ours is mParents[mIndex]. | |
ArrayVector3 *RESTRICT_ALIAS | mPosition |
Stores the position/translation of a node relative to its parent. | |
ArrayVector3 *RESTRICT_ALIAS | mScale |
Stores the scaling factor applied to a node. | |
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.
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. @See rebasePtrs
Note that we do NOT copy the mIndex member.
References 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(), advancePack(), copy(), and rebasePtrs().
ArrayVector3* RESTRICT_ALIAS Ogre::Transform::mDerivedPosition |
Caches the combined position from all parent nodes.
Referenced by advancePack(), advancePack(), copy(), and rebasePtrs().
ArrayVector3* RESTRICT_ALIAS Ogre::Transform::mDerivedScale |
Caches the combined scale from all parent nodes.
Referenced by advancePack(), 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(), advancePack(), copy(), and rebasePtrs().
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(), 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(), advancePack(), copy(), and rebasePtrs().
ArrayQuaternion* RESTRICT_ALIAS Ogre::Transform::mOrientation |
Stores the orientation of a node relative to it's parent.
Referenced by advancePack(), advancePack(), copy(), and rebasePtrs().
Node** Ogre::Transform::mOwner |
The Node that owns this Transform. Ours is mOwner[mIndex].
Referenced by advancePack(), advancePack(), copy(), and rebasePtrs().
Node** Ogre::Transform::mParents |
Holds the pointers to each parent. Ours is mParents[mIndex].
Referenced by advancePack(), advancePack(), copy(), and rebasePtrs().
ArrayVector3* RESTRICT_ALIAS Ogre::Transform::mPosition |
Stores the position/translation of a node relative to its parent.
Referenced by advancePack(), advancePack(), copy(), and rebasePtrs().
ArrayVector3* RESTRICT_ALIAS Ogre::Transform::mScale |
Stores the scaling factor applied to a node.
Referenced by advancePack(), advancePack(), copy(), and rebasePtrs().