OGRE 2.1
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. | |
void | advanceCullLightPack () |
Advances all pointers needed by MovableObject::cullLights to the next pack, i.e. | |
void | advanceDirtyInstanceMgr () |
Advances all pointers needed by InstanceBatch::_updateBounds to the next pack, i.e. | |
void | advanceFrustumPack () |
Advances all pointers needed by MovableObject::cullFrustum to the next pack, i.e. | |
void | advanceLightPack () |
Advances all pointers needed by MovableObject::buildLightList to the next pack, i.e. | |
void | advanceLodPack () |
void | advancePack () |
Advances all pointers to the next pack, i.e. | |
void | advancePack (size_t numAdvance) |
void | copy (const ObjectData &inCopy) |
Copies all the scalar data from the parameter into this. | |
Public Attributes | |
RealAsUint *RESTRICT_ALIAS | mDistanceToCamera |
Ours is mDistanceToCamera[mIndex]. | |
unsigned char | mIndex |
Which of the packed values is ours. Value in range [0; 4) for SSE2. | |
uint32 *RESTRICT_ALIAS | mLightMask |
The light mask defined for this movable. | |
ArrayAabb *RESTRICT_ALIAS | mLocalAabb |
Bounding box in local space. | |
Real *RESTRICT_ALIAS | mLocalRadius |
@See mLocalAabb | |
MovableObject ** | mOwner |
The movable object that owns this ObjectData. Ours is mOwner[mIndex]. | |
Node ** | mParents |
Holds the pointers to each parent. Ours is mParents[mIndex]. | |
uint32 *RESTRICT_ALIAS | mQueryFlags |
Flags determining whether this object is included / excluded from scene queries. | |
Real * | mUpperDistance [2] |
Upper distance to still render. Ours is mUpperDistance[mIndex]. | |
uint32 *RESTRICT_ALIAS | mVisibilityFlags |
Flags determining whether this object is visible (compared to SceneManager mask) | |
ArrayAabb *RESTRICT_ALIAS | mWorldAabb |
Bounding box in world space. | |
Real *RESTRICT_ALIAS | mWorldRadius |
Ours is mWorldRadius[mIndex]. | |
Represents the transform of a single object, arranged in SoA (Structure of Arrays)
|
inline |
References mUpperDistance.
|
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, mLocalRadius, mOwner, mParents, mWorldAabb, and mWorldRadius.
|
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, mLightMask, mOwner, mVisibilityFlags, mWorldAabb, and mWorldRadius.
|
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, mVisibilityFlags, mWorldAabb, and mWorldRadius.
|
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, mDistanceToCamera, mOwner, mUpperDistance, mVisibilityFlags, mWorldAabb, and mWorldRadius.
|
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, mLightMask, mOwner, mVisibilityFlags, mWorldAabb, and mWorldRadius.
|
inline |
References ARRAY_PACKED_REALS, mOwner, mWorldAabb, and mWorldRadius.
|
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, mDistanceToCamera, mLightMask, mLocalAabb, mLocalRadius, mOwner, mParents, mQueryFlags, mUpperDistance, mVisibilityFlags, mWorldAabb, and mWorldRadius.
References ARRAY_PACKED_REALS, mDistanceToCamera, mLightMask, mLocalAabb, mLocalRadius, mOwner, mParents, mQueryFlags, mUpperDistance, mVisibilityFlags, mWorldAabb, and mWorldRadius.
|
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. @See rebasePtrs
Note that we do NOT copy the mIndex member.
References mDistanceToCamera, mIndex, mLightMask, mLocalAabb, mLocalRadius, mOwner, mParents, mQueryFlags, mUpperDistance, mVisibilityFlags, mWorldAabb, mWorldRadius, and Ogre::ArrayAabb::setFromAabb().
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 advanceFrustumPack(), advancePack(), advancePack(), and copy().
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 advanceCullLightPack(), advanceLightPack(), advancePack(), advancePack(), and 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(), advancePack(), and copy().
Real* RESTRICT_ALIAS Ogre::ObjectData::mLocalRadius |
@See mLocalAabb
Referenced by advanceBoundsPack(), advancePack(), advancePack(), and copy().
MovableObject** Ogre::ObjectData::mOwner |
The movable object that owns this ObjectData. Ours is mOwner[mIndex].
Referenced by advanceBoundsPack(), advanceCullLightPack(), advanceFrustumPack(), advanceLightPack(), advanceLodPack(), advancePack(), advancePack(), and copy().
Node** Ogre::ObjectData::mParents |
Holds the pointers to each parent. Ours is mParents[mIndex].
Referenced by advanceBoundsPack(), advancePack(), advancePack(), and copy().
uint32* RESTRICT_ALIAS Ogre::ObjectData::mQueryFlags |
Flags determining whether this object is included / excluded from scene queries.
Referenced by advancePack(), advancePack(), and copy().
Real* Ogre::ObjectData::mUpperDistance[2] |
Upper distance to still render. Ours is mUpperDistance[mIndex].
Referenced by ObjectData(), advanceFrustumPack(), advancePack(), advancePack(), and copy().
uint32* RESTRICT_ALIAS Ogre::ObjectData::mVisibilityFlags |
Flags determining whether this object is visible (compared to SceneManager mask)
Referenced by advanceCullLightPack(), advanceDirtyInstanceMgr(), advanceFrustumPack(), advanceLightPack(), advancePack(), advancePack(), and copy().
ArrayAabb* RESTRICT_ALIAS Ogre::ObjectData::mWorldAabb |
Bounding box in world space.
Referenced by advanceBoundsPack(), advanceCullLightPack(), advanceDirtyInstanceMgr(), advanceFrustumPack(), advanceLightPack(), advanceLodPack(), advancePack(), 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 advanceBoundsPack(), advanceCullLightPack(), advanceDirtyInstanceMgr(), advanceFrustumPack(), advanceLightPack(), advanceLodPack(), advancePack(), advancePack(), and copy().