|
Pyrogenesis
13997
|
Footprints - an approximation of the entity's shape, used for collision detection and for rendering selection outlines. More...
#include <ICmpFootprint.h>
Public Types | |
| enum | EShape { CIRCLE, SQUARE } |
Public Member Functions | |
| virtual void | GetShape (EShape &shape, entity_pos_t &size0, entity_pos_t &size1, entity_pos_t &height)=0 |
| Return the shape of this footprint. More... | |
| CScriptVal | GetShape_wrapper () |
| GetShape wrapper for script calls. More... | |
| virtual CFixedVector3D | PickSpawnPoint (entity_id_t spawned)=0 |
| Pick a sensible position to place a newly-spawned entity near this footprint, such that it won't be in an invalid (obstructed) location regardless of the spawned unit's orientation. More... | |
Public Member Functions inherited from IComponent | |
| virtual | ~IComponent () |
| virtual void | Init (const CParamNode ¶mNode)=0 |
| virtual void | Deinit ()=0 |
| virtual void | HandleMessage (const CMessage &msg, bool global) |
| CEntityHandle | GetEntityHandle () const |
| void | SetEntityHandle (CEntityHandle ent) |
| entity_id_t | GetEntityId () const |
| CEntityHandle | GetSystemEntity () const |
| const CSimContext & | GetSimContext () const |
| void | SetSimContext (const CSimContext &context) |
| virtual void | Serialize (ISerializer &serialize)=0 |
| virtual void | Deserialize (const CParamNode ¶mNode, IDeserializer &deserialize)=0 |
| virtual JSClass * | GetJSClass () const |
| virtual jsval | GetJSInstance () const |
Additional Inherited Members | |
Static Public Member Functions inherited from IComponent | |
| static std::string | GetSchema () |
| static u8 | GetSerializationVersion () |
Footprints - an approximation of the entity's shape, used for collision detection and for rendering selection outlines.
A footprint is either a circle (of some radius) or square (of some width and depth (actually it's a rectangle)), horizontally aligned, extruded to a given height.
Definition at line 33 of file ICmpFootprint.h.
| Enumerator | |
|---|---|
| CIRCLE | |
| SQUARE | |
Definition at line 36 of file ICmpFootprint.h.
|
pure virtual |
Return the shape of this footprint.
Shapes are horizontal circles or squares, extended vertically upwards to make cylinders or boxes.
| [out] | shape | either CIRCLE or SQUARE |
| [out] | size0 | if CIRCLE then radius, else width (size in X axis) |
| [out] | size1 | if CIRCLE then radius, else depth (size in Z axis) |
| [out] | height | size in Y axis |
Implemented in CCmpFootprint.
| CScriptVal ICmpFootprint::GetShape_wrapper | ( | ) |
GetShape wrapper for script calls.
Returns { "type": "circle", "radius": 5.0, "height": 1.0 } or { "type": "square", "width": 5.0, "depth": 5.0, "height": 1.0 }
Definition at line 27 of file ICmpFootprint.cpp.
|
pure virtual |
Pick a sensible position to place a newly-spawned entity near this footprint, such that it won't be in an invalid (obstructed) location regardless of the spawned unit's orientation.
Implemented in CCmpFootprint.
1.8.5