#include <W3DTerrainLogic.h>
Inherits TerrainLogic.
Public Member Functions | |
| W3DTerrainLogic () | |
| virtual | ~W3DTerrainLogic () |
| virtual void | init (void) |
| Init. | |
| virtual void | reset (void) |
| Reset. | |
| virtual void | update (void) |
| Update. | |
| virtual Bool | loadMap (AsciiString filename, Bool query) |
| virtual void | newMap (Bool saveGame) |
| Initialize the logic for new map. | |
| virtual Real | getGroundHeight (Real x, Real y, Coord3D *normal=NULL) const |
| virtual Bool | isCliffCell (Real x, Real y) const |
| is point cliff cell. | |
| virtual Real | getLayerHeight (Real x, Real y, PathfindLayerEnum layer, Coord3D *normal=NULL, Bool clip=true) const |
| virtual void | getExtent (Region3D *extent) const |
| Get the 3D extent of the terrain in world coordinates. | |
| virtual void | getMaximumPathfindExtent (Region3D *extent) const |
| virtual void | getExtentIncludingBorder (Region3D *extent) const |
| virtual Bool | isClearLineOfSight (const Coord3D &pos, const Coord3D &posOther) const |
Public Member Functions inherited from TerrainLogic | |
| TerrainLogic () | |
| virtual | ~TerrainLogic () |
| virtual Coord3D | findClosestEdgePoint (const Coord3D *closestTo) const |
| virtual Coord3D | findFarthestEdgePoint (const Coord3D *farthestFrom) const |
| virtual AsciiString | getSourceFilename (void) |
| virtual PathfindLayerEnum | alignOnTerrain (Real angle, const Coord3D &pos, Bool stickToGround, Matrix3D &mtx) |
| virtual Bool | isUnderwater (Real x, Real y, Real *waterZ=NULL, Real *terrainZ=NULL) |
| is point under water | |
| virtual const WaterHandle * | getWaterHandle (Real x, Real y) |
| get water handle at this location | |
| virtual const WaterHandle * | getWaterHandleByName (AsciiString name) |
| get water handle by name | |
| virtual Real | getWaterHeight (const WaterHandle *water) |
| get height of water table | |
| virtual void | setWaterHeight (const WaterHandle *water, Real height, Real damageAmount, Bool forcePathfindUpdate) |
| set height of water table | |
| virtual void | changeWaterHeightOverTime (const WaterHandle *water, Real finalHeight, Real transitionTimeInSeconds, Real damageAmount) |
| change water height over time | |
| virtual Waypoint * | getFirstWaypoint (void) |
| virtual Waypoint * | getWaypointByName (AsciiString name) |
| Return the waypoint with the given name. | |
| virtual Waypoint * | getWaypointByID (UnsignedInt id) |
| Return the waypoint with the given ID. | |
| virtual Waypoint * | getClosestWaypointOnPath (const Coord3D *pos, AsciiString label) |
| Return the closest waypoint on the labeled path. | |
| virtual Bool | isPurposeOfPath (Waypoint *pWay, AsciiString label) |
| Return true if the waypoint path containint pWay is labeled with the label. | |
| virtual PolygonTrigger * | getTriggerAreaByName (AsciiString name) |
| Return the trigger area with the given name. | |
| virtual Bridge * | getFirstBridge (void) const |
| Gets the first bridge. Traverse all bridges using bridge->getNext();. | |
| virtual Bridge * | findBridgeAt (const Coord3D *pLoc) const |
| Find the bridge at a location. NULL means no bridge. | |
| virtual Bridge * | findBridgeLayerAt (const Coord3D *pLoc, PathfindLayerEnum layer, Bool clip=true) const |
| Find the bridge at a location. NULL means no bridge. Note that the layer value will be used to resolve crossing bridges. | |
| virtual Bool | objectInteractsWithBridgeLayer (Object *obj, Int layer, Bool considerBridgeHealth=true) const |
| Returns true if the object is close enough to interact with the bridge for pathfinding. | |
| virtual Bool | objectInteractsWithBridgeEnd (Object *obj, Int layer) const |
| Returns true if the object is close to one or the other end of the bridge. | |
| virtual Drawable * | pickBridge (const Vector3 &from, const Vector3 &to, Vector3 *pos) |
| virtual void | addBridgeToLogic (BridgeInfo *pInfo, Dict *props, AsciiString bridgeTemplateName) |
| Adds a bridge's logical info. | |
| virtual void | addLandmarkBridgeToLogic (Object *bridgeObj) |
| Adds a bridge's logical info. | |
| virtual void | deleteBridge (Bridge *bridge) |
| remove a bridge | |
| virtual void | updateBridgeDamageStates (void) |
| Updates bridge's damage info. | |
| Bool | anyBridgesDamageStatesChanged (void) |
| Bridge damage states updated. | |
| Bool | isBridgeRepaired (const Object *bridge) |
| Is bridge repaired? | |
| Bool | isBridgeBroken (const Object *bridge) |
| Is bridge Broken? | |
| void | getBridgeAttackPoints (const Object *bridge, TBridgeAttackInfo *info) |
| Get bridge attack points. | |
| PathfindLayerEnum | getLayerForDestination (const Coord3D *pos) |
| PathfindLayerEnum | getHighestLayerForDestination (const Coord3D *pos, Bool onlyHealthyBridges=false) |
| void | enableWaterGrid (Bool enable) |
| enable/disable the water grid | |
| Int | getActiveBoundary (void) |
| void | setActiveBoundary (Int newActiveBoundary) |
| void | flattenTerrain (Object *obj) |
| Flatten the terrain under a building. | |
| void | createCraterInTerrain (Object *obj) |
| Flatten the terrain under a building. | |
Public Member Functions inherited from Snapshot | |
| Snapshot (void) | |
| ~Snapshot (void) | |
Public Member Functions inherited from SubsystemInterface | |
| SubsystemInterface () | |
| virtual | ~SubsystemInterface () |
| virtual void | postProcessLoad () |
| virtual void | draw (void) |
| void | UPDATE (void) |
| void | DRAW (void) |
| AsciiString | getName (void) |
| void | setName (AsciiString name) |
Protected Member Functions | |
| virtual void | crc (Xfer *xfer) |
| virtual void | xfer (Xfer *xfer) |
| virtual void | loadPostProcess (void) |
Protected Member Functions inherited from TerrainLogic | |
| Bool | parseWaypointData (DataChunkInput &file, DataChunkInfo *info, void *userData) |
| Chunk parser callback. | |
| void | addWaypoint (MapObject *pMapObj) |
| Add a waypoint to the list. | |
| void | addWaypointLink (Int id1, Int id2) |
| Add a directed link between waypoints. | |
| void | deleteWaypoints (void) |
| Deletes all waypoints. | |
| void | deleteBridges (void) |
| Deletes all bridges. | |
| void | findAxisAlignedBoundingRect (const WaterHandle *waterHandle, Region3D *region) |
| find the axis aligned region bounding the water table | |
Protected Attributes | |
| Real | m_mapMinZ |
| Minimum terrain z value. | |
| Real | m_mapMaxZ |
| Maximum terrain z value. | |
Protected Attributes inherited from TerrainLogic | |
| UnsignedByte * | m_mapData |
| array of height samples | |
| Int | m_mapDX |
| width of map samples | |
| Int | m_mapDY |
| height of map samples | |
| VecICoord2D | m_boundaries |
| Int | m_activeBoundary |
| Waypoint * | m_waypointListHead |
| Bridge * | m_bridgeListHead |
| Bool | m_bridgeDamageStatesChanged |
| AsciiString | m_filenameString |
| filename for terrain data | |
| Bool | m_waterGridEnabled |
| TRUE when water grid is enabled. | |
| struct TerrainLogic::DynamicWaterEntry | m_waterToUpdate [MAX_DYNAMIC_WATER] |
| water tables to dynamicall update | |
| Int | m_numWaterToUpdate |
| how many valid entries are in m_waterToUpdate | |
Protected Attributes inherited from SubsystemInterface | |
| AsciiString | m_name |
Additional Inherited Members | |
Protected Types inherited from TerrainLogic | |
| enum | { MAX_DYNAMIC_WATER = 64 } |
Static Protected Member Functions inherited from TerrainLogic | |
| static Bool | parseWaypointDataChunk (DataChunkInput &file, DataChunkInfo *info, void *userData) |
| Chunk parser callback. | |
Static Protected Attributes inherited from TerrainLogic | |
| static WaterHandle | m_gridWaterHandle |
| water handle for the grid water (we only presently have one) | |
W3D specific implementation details for logical terrain ... we have this because the logic and visual terrain are closely tied together in that they represent the same thing, but need to be broken up into logical and graphical representations
Definition at line 43 of file W3DTerrainLogic.h.
| W3DTerrainLogic::W3DTerrainLogic | ( | ) |
Definition at line 52 of file W3DTerrainLogic.cpp.
|
virtual |
Definition at line 61 of file W3DTerrainLogic.cpp.
|
protectedvirtual |
|
virtual |
Get the 3D extent of the terrain in world coordinates.
Get the 3D extent of the terrain in world coordinates
Reimplemented from TerrainLogic.
Definition at line 200 of file W3DTerrainLogic.cpp.
|
virtual |
Reimplemented from TerrainLogic.
Definition at line 252 of file W3DTerrainLogic.cpp.
W3D specific get height function for logical terrain
Reimplemented from TerrainLogic.
Definition at line 280 of file W3DTerrainLogic.cpp.
|
virtual |
Get the height considering the layer.
Reimplemented from TerrainLogic.
Definition at line 305 of file W3DTerrainLogic.cpp.
|
virtual |
Get the 3D largest bounds defined in the map.
Reimplemented from TerrainLogic.
Definition at line 224 of file W3DTerrainLogic.cpp.
|
virtual |
Init.
Device DEPENDENT implementation init details for logical terrain
Reimplemented from TerrainLogic.
Definition at line 71 of file W3DTerrainLogic.cpp.
|
virtual |
Reimplemented from TerrainLogic.
Definition at line 265 of file W3DTerrainLogic.cpp.
is point cliff cell.
W3D isCliffCell for terrain logic
Reimplemented from TerrainLogic.
Definition at line 359 of file W3DTerrainLogic.cpp.
|
virtual |
Device DEPENDENT implementation for load details of logical terrain. Note - if query is true, we are
< holds raw heightmap data samples
Reimplemented from TerrainLogic.
Definition at line 118 of file W3DTerrainLogic.cpp.
|
protectedvirtual |
Load post process
Reimplemented from TerrainLogic.
Definition at line 398 of file W3DTerrainLogic.cpp.
|
virtual |
Initialize the logic for new map.
newMap
Reimplemented from TerrainLogic.
Definition at line 99 of file W3DTerrainLogic.cpp.
|
virtual |
|
virtual |
|
protectedvirtual |
Xfer Version Info: 1: Initial version
Reimplemented from TerrainLogic.
Definition at line 382 of file W3DTerrainLogic.cpp.
|
protected |
Maximum terrain z value.
Definition at line 81 of file W3DTerrainLogic.h.
|
protected |
Minimum terrain z value.
Definition at line 80 of file W3DTerrainLogic.h.