Flags an entity as obstructing movement for other units, and handles the processing of collision queries.
More...
#include <ICmpObstruction.h>
|
virtual
ICmpObstructionManager::tag_t | GetObstruction ()=0 |
|
virtual bool | GetObstructionSquare (ICmpObstructionManager::ObstructionSquare &out)=0 |
| Gets the square corresponding to this obstruction shape. More...
|
|
virtual entity_pos_t | GetUnitRadius ()=0 |
|
virtual bool | IsControlPersistent ()=0 |
|
virtual EFoundationCheck | CheckFoundation (std::string className)=0 |
| Test whether this entity is colliding with any obstruction that are set to block the creation of foundations. More...
|
|
virtual EFoundationCheck | CheckFoundation (std::string className, bool onlyCenterPoint)=0 |
|
virtual std::string | CheckFoundation_wrapper (std::string className, bool onlyCenterPoint) |
| CheckFoundation wrapper for script calls, to return friendly strings instead of an EFoundationCheck. More...
|
|
virtual bool | CheckDuplicateFoundation ()=0 |
| Test whether this entity is colliding with any obstructions that share its control groups and block the creation of foundations. More...
|
|
virtual std::vector< entity_id_t > | GetEntityCollisions (bool checkStructures, bool checkUnits)=0 |
| Returns a list of entities that are colliding with this entity, filtered depending on type of entities that are requested. More...
|
|
virtual void | ResolveFoundationCollisions ()=0 |
| Detects collisions between foundation-blocking entities and tries to fix them by setting control groups, if appropriate. More...
|
|
virtual void | SetActive (bool active)=0 |
|
virtual void | SetMovingFlag (bool enabled)=0 |
|
virtual void | SetDisableBlockMovementPathfinding (bool movementDisabled, bool pathfindingDisabled, int32_t shape)=0 |
|
virtual bool | GetBlockMovementFlag ()=0 |
|
virtual void | SetControlGroup (entity_id_t group)=0 |
| Change the control group that the entity belongs to. More...
|
|
virtual entity_id_t | GetControlGroup ()=0 |
| See SetControlGroup. More...
|
|
virtual void | SetControlGroup2 (entity_id_t group2)=0 |
|
virtual entity_id_t | GetControlGroup2 ()=0 |
|
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 |
|
Flags an entity as obstructing movement for other units, and handles the processing of collision queries.
Definition at line 29 of file ICmpObstruction.h.
Enumerator |
---|
FOUNDATION_CHECK_SUCCESS |
|
FOUNDATION_CHECK_FAIL_ERROR |
|
FOUNDATION_CHECK_FAIL_NO_OBSTRUCTION |
|
FOUNDATION_CHECK_FAIL_OBSTRUCTS_FOUNDATION |
|
FOUNDATION_CHECK_FAIL_TERRAIN_CLASS |
|
Definition at line 33 of file ICmpObstruction.h.
virtual bool ICmpObstruction::CheckDuplicateFoundation |
( |
| ) |
|
|
pure virtual |
Test whether this entity is colliding with any obstructions that share its control groups and block the creation of foundations.
- Returns
- true if foundation is valid (not obstructed)
Implemented in CCmpObstruction.
virtual EFoundationCheck ICmpObstruction::CheckFoundation |
( |
std::string |
className | ) |
|
|
pure virtual |
Test whether this entity is colliding with any obstruction that are set to block the creation of foundations.
- Parameters
-
ignoredEntities | List of entities to ignore during the test. |
- Returns
- FOUNDATION_CHECK_SUCCESS if check passes, else an EFoundationCheck value describing the type of failure.
Implemented in CCmpObstruction.
virtual EFoundationCheck ICmpObstruction::CheckFoundation |
( |
std::string |
className, |
|
|
bool |
onlyCenterPoint |
|
) |
| |
|
pure virtual |
std::string ICmpObstruction::CheckFoundation_wrapper |
( |
std::string |
className, |
|
|
bool |
onlyCenterPoint |
|
) |
| |
|
virtual |
CheckFoundation wrapper for script calls, to return friendly strings instead of an EFoundationCheck.
- Returns
- "success" if check passes, else a string describing the type of failure.
Definition at line 26 of file ICmpObstruction.cpp.
virtual bool ICmpObstruction::GetBlockMovementFlag |
( |
| ) |
|
|
pure virtual |
virtual entity_id_t ICmpObstruction::GetControlGroup |
( |
| ) |
|
|
pure virtual |
virtual entity_id_t ICmpObstruction::GetControlGroup2 |
( |
| ) |
|
|
pure virtual |
virtual std::vector<entity_id_t> ICmpObstruction::GetEntityCollisions |
( |
bool |
checkStructures, |
|
|
bool |
checkUnits |
|
) |
| |
|
pure virtual |
Returns a list of entities that are colliding with this entity, filtered depending on type of entities that are requested.
- Returns
- vector of blocking entities
Implemented in CCmpObstruction.
Gets the square corresponding to this obstruction shape.
- Returns
- true and updates
out
on success; false on failure (e.g. object not in the world).
Implemented in CCmpObstruction.
virtual bool ICmpObstruction::IsControlPersistent |
( |
| ) |
|
|
pure virtual |
virtual void ICmpObstruction::ResolveFoundationCollisions |
( |
| ) |
|
|
pure virtual |
Detects collisions between foundation-blocking entities and tries to fix them by setting control groups, if appropriate.
Implemented in CCmpObstruction.
virtual void ICmpObstruction::SetActive |
( |
bool |
active | ) |
|
|
pure virtual |
virtual void ICmpObstruction::SetControlGroup |
( |
entity_id_t |
group | ) |
|
|
pure virtual |
Change the control group that the entity belongs to.
Control groups are used to let units ignore collisions with other units from the same group. Default is the entity's own ID.
Implemented in CCmpObstruction.
virtual void ICmpObstruction::SetControlGroup2 |
( |
entity_id_t |
group2 | ) |
|
|
pure virtual |
virtual void ICmpObstruction::SetDisableBlockMovementPathfinding |
( |
bool |
movementDisabled, |
|
|
bool |
pathfindingDisabled, |
|
|
int32_t |
shape |
|
) |
| |
|
pure virtual |
virtual void ICmpObstruction::SetMovingFlag |
( |
bool |
enabled | ) |
|
|
pure virtual |
The documentation for this class was generated from the following files: