#include <RenderableObject.h>
|
void | RecalculateBoundsIfNecessary () |
| Factored out so subclasses don't need to repeat this if they want to add additional getters for bounds-related methods (since they'll have to make sure to recalc the bounds if necessary before they return it). More...
|
|
CRenderableObject::CRenderableObject |
( |
| ) |
|
|
inline |
virtual CRenderableObject::~CRenderableObject |
( |
| ) |
|
|
inlinevirtual |
virtual void CRenderableObject::CalcBounds |
( |
| ) |
|
|
pure virtual |
(Re)calculates and stores any bounds or bound-dependent data for this object.
At this abstraction level, this is only the world-space bounds stored in m_WorldBounds; subclasses may use this method to (re)compute additional bounds if necessary, or any data that depends on the bounds. Whenever bound-dependent data is requested through a public interface, RecalculateBoundsIfNecessary should be called first to ensure bound correctness, which will in turn call this method if it turns out that they're outdated.
- See also
- m_BoundsValid
-
RecalculateBoundsIfNecessary
Implemented in CModelParticleEmitter, CModel, CModelDecal, and CPatch.
const CMatrix3D& CRenderableObject::GetInvTransform |
( |
| ) |
const |
|
inline |
Return object renderdata - can be null if renderer hasn't yet created the renderdata.
const CMatrix3D& CRenderableObject::GetTransform |
( |
| ) |
const |
|
inline |
Returns the world-space axis-aligned bounds of this object.
virtual void CRenderableObject::InvalidateBounds |
( |
| ) |
|
|
inlinevirtual |
Marks the bounds as invalid.
This will trigger RecalculateBoundsIfNecessary to recompute any bound-related data the next time any bound-related data is requested through a public interface – at least, if you've made sure to call it before returning the stored data.
Reimplemented in CModelAbstract.
void CRenderableObject::RecalculateBoundsIfNecessary |
( |
| ) |
|
|
inlineprotected |
Factored out so subclasses don't need to repeat this if they want to add additional getters for bounds-related methods (since they'll have to make sure to recalc the bounds if necessary before they return it).
void CRenderableObject::SetDirty |
( |
u32 |
dirtyflags | ) |
|
|
inline |
void CRenderableObject::SetRenderData |
( |
CRenderData * |
renderdata | ) |
|
|
inline |
virtual void CRenderableObject::SetTransform |
( |
const CMatrix3D & |
transform | ) |
|
|
inlinevirtual |
bool CRenderableObject::m_BoundsValid |
|
protected |
Remembers whether any bounds need to be recalculated.
Subclasses that add any data that depends on the bounds should take care to consider the validity of the bounds and recalculate their data when necessary – overriding CalcBounds to do so would be a good idea, since it's already set up to be called by RecalculateBoundsIfNecessary whenever the bounds are marked as invalid. The latter should then be called before returning any bounds or bounds-derived data through a public interface (see the implementation of GetWorldBounds for an example).
- See also
- CalcBounds
-
InvalidateBounds
-
RecalculateBoundsIfNecessary
World-space bounds of this object.
The documentation for this class was generated from the following file: