OGRE
2.2.4
Object-Oriented Graphics Rendering Engine
|
Represents the transform of a single object, arranged in SoA (Structure of Arrays) More...
#include <OgreObjectData.h>
Public Member Functions | |
ObjectData () | |
void | advanceBoundsPack () |
Advances all pointers needed by MovableObject::updateAllBounds to the next pack, i.e. More... | |
void | advanceCullLightPack () |
Advances all pointers needed by MovableObject::cullLights to the next pack, i.e. More... | |
void | advanceDirtyInstanceMgr () |
Advances all pointers needed by InstanceBatch::_updateBounds to the next pack, i.e. More... | |
void | advanceFrustumPack () |
Advances all pointers needed by MovableObject::cullFrustum to the next pack, i.e. More... | |
void | advanceLightPack () |
Advances all pointers needed by MovableObject::buildLightList to the next pack, i.e. More... | |
void | advanceLodPack () |
void | advancePack () |
Advances all pointers to the next pack, i.e. More... | |
void | advancePack (size_t numAdvance) |
void | copy (const ObjectData &inCopy) |
Copies all the scalar data from the parameter into this. More... | |
Public Attributes | |
RealAsUint *RESTRICT_ALIAS | mDistanceToCamera |
Ours is mDistanceToCamera[mIndex]. More... | |
unsigned char | mIndex |
Which of the packed values is ours. Value in range [0; 4) for SSE2. More... | |
uint32 *RESTRICT_ALIAS | mLightMask |
The light mask defined for this movable. More... | |
ArrayAabb *RESTRICT_ALIAS | mLocalAabb |
Bounding box in local space. More... | |
Real *RESTRICT_ALIAS | mLocalRadius |
mLocalAabb More... | |
MovableObject ** | mOwner |
The movable object that owns this ObjectData. Ours is mOwner[mIndex]. More... | |
Node ** | mParents |
Holds the pointers to each parent. Ours is mParents[mIndex]. More... | |
uint32 *RESTRICT_ALIAS | mQueryFlags |
Flags determining whether this object is included / excluded from scene queries. More... | |
Real * | mUpperDistance [2] |
Upper distance to still render. Ours is mUpperDistance[mIndex]. More... | |
uint32 *RESTRICT_ALIAS | mVisibilityFlags |
Flags determining whether this object is visible (compared to SceneManager mask) More... | |
ArrayAabb *RESTRICT_ALIAS | mWorldAabb |
Bounding box in world space. More... | |
Real *RESTRICT_ALIAS | mWorldRadius |
Ours is mWorldRadius[mIndex]. More... | |
Represents the transform of a single object, arranged in SoA (Structure of Arrays)
|
inline |
|
inline |
Advances all pointers needed by MovableObject::updateAllBounds 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, mLocalAabb, and mWorldAabb.
|
inline |
Advances all pointers needed by MovableObject::cullLights 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, and mWorldAabb.
|
inline |
Advances all pointers needed by InstanceBatch::_updateBounds 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, and mWorldAabb.
|
inline |
Advances all pointers needed by MovableObject::cullFrustum 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, and mWorldAabb.
|
inline |
Advances all pointers needed by MovableObject::buildLightList 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, and mWorldAabb.
|
inline |
References ARRAY_PACKED_REALS, and mWorldAabb.
|
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, mLocalAabb, and mWorldAabb.
|
inline |
References ARRAY_PACKED_REALS.
|
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. rebasePtrs
Note that we do NOT copy the mIndex member.
References Ogre::ArrayAabb::getAsAabb(), mDistanceToCamera, mIndex, mLightMask, mLocalAabb, mLocalRadius, mOwner, mParents, mQueryFlags, mUpperDistance, mVisibilityFlags, mWorldAabb, and mWorldRadius.
RealAsUint* RESTRICT_ALIAS Ogre::ObjectData::mDistanceToCamera |
Ours is mDistanceToCamera[mIndex].
It is the distance to camera. Value can be negative to account for radius (i.e. when the camera is "inside" the bounds of the object)
Referenced by copy().
unsigned char Ogre::ObjectData::mIndex |
Which of the packed values is ours. Value in range [0; 4) for SSE2.
Referenced by copy().
uint32* RESTRICT_ALIAS Ogre::ObjectData::mLightMask |
The light mask defined for this movable.
This will be taken into consideration when deciding which light should affect this movable
Referenced by copy().
ArrayAabb* RESTRICT_ALIAS Ogre::ObjectData::mLocalAabb |
Bounding box in local space.
It's argueable whether it should be like this, or pointer to a shared aabb (i.e. mesh aabb) to save RAM at the cost of another level of indirection, and converting AoS to SoA, but it's more convenient for SIMD processing to store each local aabb in the movable object (maximize throughput).
Referenced by advanceBoundsPack(), advancePack(), and copy().
Real* RESTRICT_ALIAS Ogre::ObjectData::mLocalRadius |
mLocalAabb
Referenced by copy().
MovableObject** Ogre::ObjectData::mOwner |
The movable object that owns this ObjectData. Ours is mOwner[mIndex].
Referenced by copy().
Node** Ogre::ObjectData::mParents |
Holds the pointers to each parent. Ours is mParents[mIndex].
Referenced by copy().
uint32* RESTRICT_ALIAS Ogre::ObjectData::mQueryFlags |
Flags determining whether this object is included / excluded from scene queries.
Referenced by copy().
Real* Ogre::ObjectData::mUpperDistance[2] |
Upper distance to still render. Ours is mUpperDistance[mIndex].
Referenced by copy().
uint32* RESTRICT_ALIAS Ogre::ObjectData::mVisibilityFlags |
Flags determining whether this object is visible (compared to SceneManager mask)
Referenced by copy().
ArrayAabb* RESTRICT_ALIAS Ogre::ObjectData::mWorldAabb |
Bounding box in world space.
Referenced by advanceBoundsPack(), advanceCullLightPack(), advanceDirtyInstanceMgr(), advanceFrustumPack(), advanceLightPack(), advanceLodPack(), advancePack(), and copy().
Real* RESTRICT_ALIAS Ogre::ObjectData::mWorldRadius |
Ours is mWorldRadius[mIndex].
It is the local radius transformed by scale An ArraySphere out of mWorldAabb & WorldRadius for computations
Referenced by copy().