Pyrogenesis
13997
|
Motion interface for entities with complex movement capabilities. More...
#include <ICmpUnitMotion.h>
Public Member Functions | |
virtual bool | MoveToPointRange (entity_pos_t x, entity_pos_t z, entity_pos_t minRange, entity_pos_t maxRange)=0 |
Attempt to walk into range of a to a given point, or as close as possible. More... | |
virtual bool | IsInPointRange (entity_pos_t x, entity_pos_t z, entity_pos_t minRange, entity_pos_t maxRange)=0 |
Determine wether the givven point is within the given range, using the same measurement as MoveToPointRange. More... | |
virtual bool | IsInTargetRange (entity_id_t target, entity_pos_t minRange, entity_pos_t maxRange)=0 |
Determine whether the target is within the given range, using the same measurement as MoveToTargetRange. More... | |
virtual bool | MoveToTargetRange (entity_id_t target, entity_pos_t minRange, entity_pos_t maxRange)=0 |
Attempt to walk into range of a given target entity, or as close as possible. More... | |
virtual void | MoveToFormationOffset (entity_id_t target, entity_pos_t x, entity_pos_t z)=0 |
Join a formation, and move towards a given offset relative to the formation controller entity. More... | |
virtual void | FaceTowardsPoint (entity_pos_t x, entity_pos_t z)=0 |
Turn to look towards the given point. More... | |
virtual void | StopMoving ()=0 |
Stop moving immediately. More... | |
virtual fixed | GetCurrentSpeed ()=0 |
Get the current movement speed. More... | |
virtual void | SetSpeed (fixed speed)=0 |
Set the current movement speed. More... | |
virtual bool | IsMoving ()=0 |
Get whether the unit is moving. More... | |
virtual fixed | GetWalkSpeed ()=0 |
Get the default speed that this unit will have when walking, in metres per second. More... | |
virtual fixed | GetRunSpeed ()=0 |
Get the default speed that this unit will have when running, in metres per second. More... | |
virtual void | SetFacePointAfterMove (bool facePointAfterMove)=0 |
Set whether the unit will turn to face the target point after finishing moving. More... | |
virtual ICmpPathfinder::pass_class_t | GetPassabilityClass ()=0 |
Get the unit's passability class. More... | |
virtual void | SetUnitRadius (fixed radius)=0 |
Override the default obstruction radius, used for planning paths and checking for collisions. More... | |
virtual void | SetDebugOverlay (bool enabled)=0 |
Toggle the rendering of debug info. More... | |
![]() | |
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 std::string | GetSchema () |
static u8 | GetSerializationVersion () |
Motion interface for entities with complex movement capabilities.
(Simpler motion is handled by ICmpMotion instead.)
Currently this is limited to telling the entity to walk to a point. Eventually it should support different movement speeds, moving to areas instead of points, moving as part of a group, moving as part of a formation, etc.
Definition at line 35 of file ICmpUnitMotion.h.
|
pure virtual |
Turn to look towards the given point.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Get the current movement speed.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Get the unit's passability class.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Get the default speed that this unit will have when running, in metres per second.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Get the default speed that this unit will have when walking, in metres per second.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Determine wether the givven point is within the given range, using the same measurement as MoveToPointRange.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Determine whether the target is within the given range, using the same measurement as MoveToTargetRange.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Get whether the unit is moving.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Join a formation, and move towards a given offset relative to the formation controller entity.
Continues following the formation until given a different command.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Attempt to walk into range of a to a given point, or as close as possible.
If the unit is already in range, or cannot move anywhere at all, or if there is some other error, then returns false. Otherwise, returns true and sends a MotionChanged message after starting to move, and sends another MotionChanged after finishing moving. If maxRange is negative, then the maximum range is treated as infinity.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Attempt to walk into range of a given target entity, or as close as possible.
If the unit is already in range, or cannot move anywhere at all, or if there is some other error, then returns false. Otherwise, returns true and sends a MotionChanged message after starting to move, and sends another MotionChanged after finishing moving. If maxRange is negative, then the maximum range is treated as infinity.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Toggle the rendering of debug info.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Set whether the unit will turn to face the target point after finishing moving.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Set the current movement speed.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Override the default obstruction radius, used for planning paths and checking for collisions.
Bad things may happen if this entity has an active Obstruction component with a larger radius. (This is intended primarily for formation controllers.)
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.
|
pure virtual |
Stop moving immediately.
Implemented in CCmpUnitMotion, and CCmpUnitMotionScripted.