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 <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 |
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 |
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.
|
inline |
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.
Note that we do NOT copy the mIndex member.
References Ogre::ArrayAabb::getAsAabb(), 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(), and 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 advanceCullLightPack(), advanceLightPack(), 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(), and copy().
Real* RESTRICT_ALIAS Ogre::ObjectData::mLocalRadius |
Referenced by advanceBoundsPack(), 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(), and copy().
Node** Ogre::ObjectData::mParents |
Holds the pointers to each parent. Ours is mParents[mIndex].
Referenced by advanceBoundsPack(), advancePack(), and copy().
uint32* RESTRICT_ALIAS Ogre::ObjectData::mQueryFlags |
Flags determining whether this object is included / excluded from scene queries.
Referenced by advancePack(), and copy().
Real* Ogre::ObjectData::mUpperDistance[2] |
Upper distance to still render. Ours is mUpperDistance[mIndex].
Referenced by ObjectData(), advanceFrustumPack(), 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(), and 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 advanceBoundsPack(), advanceCullLightPack(), advanceDirtyInstanceMgr(), advanceFrustumPack(), advanceLightPack(), advanceLodPack(), advancePack(), and copy().