Pyrogenesis trunk
Public Member Functions | Public Attributes | List of all members
CPatch Class Reference

#include <Patch.h>

Inheritance diagram for CPatch:
Inheritance graph
[legend]
Collaboration diagram for CPatch:
Collaboration graph
[legend]

Public Member Functions

 CPatch ()
 
 ~CPatch ()
 
void Initialize (CTerrain *parent, ssize_t x, ssize_t z)
 
void CalcBounds ()
 (Re)calculates and stores any bounds or bound-dependent data for this object. More...
 
int GetSideFlags ()
 
- Public Member Functions inherited from CRenderableObject
 CRenderableObject ()
 
virtual ~CRenderableObject ()
 
virtual void SetTransform (const CMatrix3D &transform)
 
const CMatrix3DGetTransform () const
 
const CMatrix3DGetInvTransform () const
 
void SetDirty (u32 dirtyflags)
 
virtual void CalcBounds ()=0
 (Re)calculates and stores any bounds or bound-dependent data for this object. More...
 
const CBoundingBoxAlignedGetWorldBounds ()
 Returns the world-space axis-aligned bounds of this object. More...
 
virtual void InvalidateBounds ()
 Marks the bounds as invalid. More...
 
void SetRenderData (CRenderData *renderdata)
 
CRenderDataGetRenderData ()
 Return object renderdata - can be null if renderer hasn't yet created the renderdata. More...
 

Public Attributes

CMiniPatch m_MiniPatches [PATCH_SIZE][PATCH_SIZE]
 
int m_X
 
int m_Z
 
CTerrainm_Parent
 

Additional Inherited Members

- Protected Member Functions inherited from CRenderableObject
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...
 
- Protected Attributes inherited from CRenderableObject
CBoundingBoxAligned m_WorldBounds
 World-space bounds of this object. More...
 
CMatrix3D m_Transform
 
CMatrix3D m_InvTransform
 
CRenderDatam_RenderData
 
bool m_BoundsValid
 Remembers whether any bounds need to be recalculated. More...
 

Constructor & Destructor Documentation

◆ CPatch()

CPatch::CPatch ( )

◆ ~CPatch()

CPatch::~CPatch ( )

Member Function Documentation

◆ CalcBounds()

void CPatch::CalcBounds ( )
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

Implements CRenderableObject.

◆ GetSideFlags()

int CPatch::GetSideFlags ( )

◆ Initialize()

void CPatch::Initialize ( CTerrain parent,
ssize_t  x,
ssize_t  z 
)

Member Data Documentation

◆ m_MiniPatches

CMiniPatch CPatch::m_MiniPatches[PATCH_SIZE][PATCH_SIZE]

◆ m_Parent

CTerrain* CPatch::m_Parent

◆ m_X

int CPatch::m_X

◆ m_Z

int CPatch::m_Z

The documentation for this class was generated from the following files: