#include <PolygonTrigger.h>
Inherits MemoryPoolObject, and Snapshot.
Public Member Functions | |
| PolygonTrigger (Int initialAllocation) | |
| void | setNextPoly (PolygonTrigger *nextPoly) |
| Link the next map object. | |
| void | addPoint (const ICoord3D &point) |
| void | setPoint (const ICoord3D &point, Int ndx) |
| void | insertPoint (const ICoord3D &point, Int ndx) |
| void | deletePoint (Int ndx) |
| void | setTriggerName (AsciiString name) |
| void | setLayerName (AsciiString name) |
| AsciiString | getLayerName (void) const |
| void | setShouldRender (Bool toggle) |
| Bool | getShouldRender () |
| void | setSelected (Bool toggle) |
| Bool | getSelected () |
| void | getCenterPoint (Coord3D *pOutCoord) const |
| Real | getRadius (void) const |
| const ICoord3D * | getPoint (Int ndx) const |
| Get a point. | |
| Int | getNumPoints (void) const |
| Int | getID (void) const |
| PolygonTrigger * | getNext (void) |
| const PolygonTrigger * | getNext (void) const |
| AsciiString | getTriggerName (void) const |
| Gets the trigger name. | |
| Bool | pointInTrigger (ICoord3D &point) const |
| Bool | doExportWithScripts (void) const |
| void | setDoExportWithScripts (Bool val) |
| Bool | isWaterArea (void) const |
| void | setWaterArea (Bool val) |
| Bool | isRiver (void) const |
| void | setRiver (Bool val) |
| Int | getRiverStart (void) const |
| void | setRiverStart (Int val) |
| const WaterHandle * | getWaterHandle (void) const |
| Bool | isValid (void) const |
Public Member Functions inherited from MemoryPoolObject | |
| void | deleteInstance () |
Public Member Functions inherited from Snapshot | |
| Snapshot (void) | |
| ~Snapshot (void) | |
Static Public Member Functions | |
| static PolygonTrigger * | getFirstPolygonTrigger (void) |
| static PolygonTrigger * | getPolygonTriggerByID (Int triggerID) |
| static Bool | ParsePolygonTriggersDataChunk (DataChunkInput &file, DataChunkInfo *info, void *userData) |
| static void | WritePolygonTriggersDataChunk (DataChunkOutput &chunkWriter) |
| Writes Triggers Info. | |
| static void | deleteTriggers (void) |
| static void | addPolygonTrigger (PolygonTrigger *pTrigger) |
| static void | removePolygonTrigger (PolygonTrigger *pTrigger) |
Protected Member Functions | |
| void | reallocate (void) |
| void | updateBounds (void) const |
| virtual void | crc (Xfer *xfer) |
| virtual void | xfer (Xfer *xfer) |
| virtual void | loadPostProcess (void) |
Protected Member Functions inherited from MemoryPoolObject | |
| virtual | ~MemoryPoolObject () |
| void * | operator new (size_t s) |
| void | operator delete (void *p) |
| virtual MemoryPool * | getObjectMemoryPool ()=0 |
Protected Attributes | |
| PolygonTrigger * | m_nextPolygonTrigger |
| linked list. | |
| AsciiString | m_triggerName |
| The name of this polygon area. | |
| Int | m_triggerID |
| Unique int id for the trigger. | |
| WaterHandle | m_waterHandle |
| handle to use this polygon as a water table | |
| ICoord3D * | m_points |
| Points that are the polygon. | |
| Int | m_numPoints |
| Num points in m_points. | |
| Int | m_sizePoints |
| Space allocated for m_points. | |
| IRegion2D | m_bounds |
| 2D bounding box for quick checks. | |
| Real | m_radius |
| Int | m_riverStart |
| Identifies the start point of the river. | |
| Bool | m_boundsNeedsUpdate |
| Bool | m_exportWithScripts |
| Bool | m_isWaterArea |
| Used to specify water areas in the map. | |
| Bool | m_isRiver |
| Used to specify that a water area is a river. | |
| AsciiString | m_layerName |
| Used to specify the layer in the World Builder. | |
| Bool | m_shouldRender |
| Bool | m_selected |
Static Protected Attributes | |
| static PolygonTrigger * | ThePolygonTriggerListPtr = NULL |
| static Int | s_currentID = 1 |
| Current id for new triggers. | |
Definition at line 67 of file PolygonTrigger.h.
| PolygonTrigger::PolygonTrigger | ( | Int | initialAllocation | ) |
PolygonTrigger - Constructor.
Definition at line 44 of file PolygonTrigger.cpp.
| void PolygonTrigger::addPoint | ( | const ICoord3D & | point | ) |
PolygonTrigger::addPoint adds a point at the end of the polygon. NOTE: It is expected that this will only get called in the editor, as in the game the poly triggers don't change.
Definition at line 346 of file PolygonTrigger.cpp.
|
static |
PolygonTrigger::addPolygonTrigger adds a trigger to the list of triggers.
Definition at line 296 of file PolygonTrigger.cpp.
|
protectedvirtual |
| void PolygonTrigger::deletePoint | ( | Int | ndx | ) |
PolygonTrigger::deletePoint . NOTE: It is expected that this will only get called in the editor, as in the game the poly triggers don't change.
Definition at line 407 of file PolygonTrigger.cpp.
|
static |
PolygonTrigger::deleteTriggers Deletes list of triggers.
Definition at line 333 of file PolygonTrigger.cpp.
|
inline |
Definition at line 145 of file PolygonTrigger.h.
| void PolygonTrigger::getCenterPoint | ( | Coord3D * | pOutCoord | ) | const |
Definition at line 419 of file PolygonTrigger.cpp.
|
inlinestatic |
Definition at line 108 of file PolygonTrigger.h.
|
inline |
Definition at line 140 of file PolygonTrigger.h.
|
inline |
Definition at line 126 of file PolygonTrigger.h.
|
inline |
Definition at line 141 of file PolygonTrigger.h.
|
inline |
Definition at line 142 of file PolygonTrigger.h.
|
inline |
Definition at line 139 of file PolygonTrigger.h.
Get a point.
Definition at line 138 of file PolygonTrigger.h.
|
static |
Find the polygon trigger with the matching ID
Definition at line 115 of file PolygonTrigger.cpp.
| Real PolygonTrigger::getRadius | ( | void | ) | const |
Definition at line 435 of file PolygonTrigger.cpp.
|
inline |
Definition at line 151 of file PolygonTrigger.h.
|
inline |
Definition at line 132 of file PolygonTrigger.h.
|
inline |
Definition at line 129 of file PolygonTrigger.h.
|
inline |
Gets the trigger name.
Definition at line 143 of file PolygonTrigger.h.
| const WaterHandle * PolygonTrigger::getWaterHandle | ( | void | ) | const |
Definition at line 486 of file PolygonTrigger.cpp.
PolygonTrigger::insertPoint . NOTE: It is expected that this will only get called in the editor, as in the game the poly triggers don't change.
Definition at line 382 of file PolygonTrigger.cpp.
|
inline |
Definition at line 149 of file PolygonTrigger.h.
| Bool PolygonTrigger::isValid | ( | void | ) | const |
Definition at line 496 of file PolygonTrigger.cpp.
|
inline |
Definition at line 147 of file PolygonTrigger.h.
|
protectedvirtual |
|
static |
PolygonTrigger::ParsePolygonTriggersDataChunk - read a polygon triggers chunk. Format is the newer CHUNKY format. See PolygonTrigger::WritePolygonTriggersDataChunk for the writer. Input: DataChunkInput
Definition at line 135 of file PolygonTrigger.cpp.
PolygonTrigger - pointInTrigger.
Definition at line 447 of file PolygonTrigger.cpp.
|
protected |
PolygonTrigger::reallocate - increases the size of the points list. NOTE: It is expected that this will only get called in the editor, as in the game the poly triggers don't change.
Definition at line 96 of file PolygonTrigger.cpp.
|
static |
PolygonTrigger::removePolygonTrigger removes a trigger to the list of triggers. note - does NOT delete pTrigger.
Definition at line 310 of file PolygonTrigger.cpp.
|
inline |
Definition at line 146 of file PolygonTrigger.h.
|
inline |
Definition at line 125 of file PolygonTrigger.h.
|
inline |
Link the next map object.
Definition at line 118 of file PolygonTrigger.h.
PolygonTrigger::setPoint sets the point at index ndx. NOTE: It is expected that this will only get called in the editor, as in the game the poly triggers don't change.
Definition at line 362 of file PolygonTrigger.cpp.
|
inline |
Definition at line 150 of file PolygonTrigger.h.
|
inline |
Definition at line 152 of file PolygonTrigger.h.
|
inline |
Definition at line 131 of file PolygonTrigger.h.
|
inline |
Definition at line 128 of file PolygonTrigger.h.
|
inline |
Definition at line 123 of file PolygonTrigger.h.
|
inline |
Definition at line 148 of file PolygonTrigger.h.
|
protected |
PolygonTrigger::updateBounds - Updates the bounds.
Definition at line 273 of file PolygonTrigger.cpp.
|
static |
Writes Triggers Info.
PolygonTrigger::WritePolygonTriggersDataChunk - Writes a Polygon triggers chunk. Format is the newer CHUNKY format. See PolygonTrigger::ParsePolygonTriggersDataChunk for the reader. Input: DataChunkInput
Definition at line 240 of file PolygonTrigger.cpp.
|
protectedvirtual |
Xfer method Version Info: 1: Initial version
Implements Snapshot.
Definition at line 518 of file PolygonTrigger.cpp.
|
mutableprotected |
2D bounding box for quick checks.
Definition at line 80 of file PolygonTrigger.h.
|
mutableprotected |
Definition at line 83 of file PolygonTrigger.h.
|
protected |
Definition at line 84 of file PolygonTrigger.h.
|
protected |
Used to specify that a water area is a river.
Definition at line 86 of file PolygonTrigger.h.
|
protected |
Used to specify water areas in the map.
Definition at line 85 of file PolygonTrigger.h.
|
protected |
Used to specify the layer in the World Builder.
Definition at line 87 of file PolygonTrigger.h.
|
protected |
linked list.
Definition at line 73 of file PolygonTrigger.h.
|
protected |
Num points in m_points.
Definition at line 78 of file PolygonTrigger.h.
|
protected |
Points that are the polygon.
Definition at line 77 of file PolygonTrigger.h.
|
mutableprotected |
Definition at line 81 of file PolygonTrigger.h.
|
protected |
Identifies the start point of the river.
Definition at line 82 of file PolygonTrigger.h.
|
protected |
Definition at line 89 of file PolygonTrigger.h.
|
protected |
Definition at line 88 of file PolygonTrigger.h.
|
protected |
Space allocated for m_points.
Definition at line 79 of file PolygonTrigger.h.
|
protected |
Unique int id for the trigger.
Definition at line 75 of file PolygonTrigger.h.
|
protected |
The name of this polygon area.
Definition at line 74 of file PolygonTrigger.h.
|
protected |
handle to use this polygon as a water table
Definition at line 76 of file PolygonTrigger.h.
|
staticprotected |
Current id for new triggers.
Definition at line 92 of file PolygonTrigger.h.
|
staticprotected |
Definition at line 91 of file PolygonTrigger.h.