#include <W3DPropBuffer.h>
Inherits Snapshot.
Public Member Functions | |
| W3DPropBuffer (void) | |
| ~W3DPropBuffer (void) | |
| void | addProp (Int id, Coord3D location, Real angle, Real scale, const AsciiString &modelName) |
| Add a prop at location. Name is the w3d model name. | |
| void | removeProp (Int id) |
| Remove a prop. | |
| Bool | updatePropPosition (Int id, const Coord3D &location, Real angle, Real scale) |
| Remove a prop. | |
| void | notifyShroudChanged (void) |
| Let us know that the shroud has changed. | |
| void | removePropsForConstruction (const Coord3D *pos, const GeometryInfo &geom, Real angle) |
| Int | addPropType (const AsciiString &modelName) |
| Add a type of prop. Name is the w3d model name. | |
| void | clearAllProps (void) |
| Empties the prop buffer. | |
| void | drawProps (RenderInfoClass &rinfo) |
| Draws the props. Uses camera for culling. | |
| void | doFullUpdate (void) |
| Called when the view changes, and sort key needs to be recalculated. | |
Protected Types | |
| enum | { MAX_PROPS =4000 } |
| enum | { MAX_TYPES = 64 } |
Protected Member Functions | |
| virtual void | crc (Xfer *xfer) |
| virtual void | xfer (Xfer *xfer) |
| virtual void | loadPostProcess (void) |
| void | cull (CameraClass *camera) |
| Culls the props. | |
Protected Attributes | |
| TProp | m_props [MAX_PROPS] |
| The prop buffer. All props are stored here. | |
| Int | m_numProps |
| Number of props in m_props. | |
| Bool | m_anythingChanged |
| Set to true if visibility or sorting changed. | |
| Bool | m_initialized |
| True if the subsystem initialized. | |
| Bool | m_doCull |
| TPropType | m_propTypes [MAX_TYPES] |
| Info about a kind of prop. | |
| Int | m_numPropTypes |
| Number of entries in m_propTypes. | |
| W3DShroudMaterialPassClass * | m_propShroudMaterialPass |
| Custom render pass which applies shrouds to objects. | |
| LightClass * | m_light |
Friends | |
| class | BaseHeightMapRenderObjClass |
Definition at line 96 of file W3DPropBuffer.h.
|
protected |
| Enumerator | |
|---|---|
| MAX_TYPES | |
Definition at line 137 of file W3DPropBuffer.h.
|
protected |
| Enumerator | |
|---|---|
| MAX_PROPS | |
Definition at line 136 of file W3DPropBuffer.h.
| W3DPropBuffer::W3DPropBuffer | ( | void | ) |
Constructor. Sets m_initialized to true if it finds the w3d models it needs for the props.
Definition at line 123 of file W3DPropBuffer.cpp.
| W3DPropBuffer::~W3DPropBuffer | ( | void | ) |
Destructor. Releases w3d assets.
Definition at line 107 of file W3DPropBuffer.cpp.
| void W3DPropBuffer::addProp | ( | Int | id, |
| Coord3D | location, | ||
| Real | angle, | ||
| Real | scale, | ||
| const AsciiString & | modelName ) |
Add a prop at location. Name is the w3d model name.
Adds a prop. Name is the W3D model name, supported models are ALPINE, DECIDUOUS and SHRUB.
Definition at line 184 of file W3DPropBuffer.cpp.
| Int W3DPropBuffer::addPropType | ( | const AsciiString & | modelName | ) |
Add a type of prop. Name is the w3d model name.
Adds a type of prop (model & texture).
Definition at line 158 of file W3DPropBuffer.cpp.
| void W3DPropBuffer::clearAllProps | ( | void | ) |
|
protectedvirtual |
|
protected |
Culls the props.
Culls the props, marking the visible flag. If a prop becomes visible, it sets it's sortKey
Definition at line 86 of file W3DPropBuffer.cpp.
|
inline |
Called when the view changes, and sort key needs to be recalculated.
Definition at line 127 of file W3DPropBuffer.h.
| void W3DPropBuffer::drawProps | ( | RenderInfoClass & | rinfo | ) |
Draws the props. Uses camera for culling.
Draws the props. Uses camera to cull.
Definition at line 327 of file W3DPropBuffer.cpp.
|
protectedvirtual |
| void W3DPropBuffer::notifyShroudChanged | ( | void | ) |
Let us know that the shroud has changed.
Sets the shroud to status, so it is recomputed.
Definition at line 311 of file W3DPropBuffer.cpp.
| void W3DPropBuffer::removeProp | ( | Int | id | ) |
| void W3DPropBuffer::removePropsForConstruction | ( | const Coord3D * | pos, |
| const GeometryInfo & | geom, | ||
| Real | angle ) |
Removes any props that would be under a building.
Definition at line 281 of file W3DPropBuffer.cpp.
|
protectedvirtual |
Xfer Version Info: 1: Initial version
Implements Snapshot.
Definition at line 407 of file W3DPropBuffer.cpp.
|
friend |
Definition at line 98 of file W3DPropBuffer.h.
|
protected |
Set to true if visibility or sorting changed.
Definition at line 141 of file W3DPropBuffer.h.
|
protected |
Definition at line 143 of file W3DPropBuffer.h.
|
protected |
True if the subsystem initialized.
Definition at line 142 of file W3DPropBuffer.h.
|
protected |
Definition at line 148 of file W3DPropBuffer.h.
|
protected |
Number of props in m_props.
Definition at line 140 of file W3DPropBuffer.h.
|
protected |
Number of entries in m_propTypes.
Definition at line 145 of file W3DPropBuffer.h.
The prop buffer. All props are stored here.
Definition at line 139 of file W3DPropBuffer.h.
|
protected |
Custom render pass which applies shrouds to objects.
Definition at line 146 of file W3DPropBuffer.h.
Info about a kind of prop.
Definition at line 144 of file W3DPropBuffer.h.