18#ifndef INCLUDED_ICMPUNITMOTION
19#define INCLUDED_ICMPUNITMOTION
#define DECLARE_INTERFACE_TYPE(iname)
Definition: Interface.h:23
u16 pass_class_t
Definition: Pathfinding.h:29
Definition: FixedVector2D.h:25
A simple fixed-point number class.
Definition: Fixed.h:120
Motion interface for entities with complex movement capabilities.
Definition: ICmpUnitMotion.h:35
virtual void SetDebugOverlay(bool enabled)=0
Toggle the rendering of debug info.
virtual void SetMemberOfFormation(entity_id_t controller)=0
Set/unset the unit as a formation member.
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.
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.
virtual bool IsTargetRangeReachable(entity_id_t target, entity_pos_t minRange, entity_pos_t maxRange)=0
Check if the target is reachable.
virtual bool GetFacePointAfterMove() const =0
virtual fixed GetSpeedMultiplier() const =0
Returns the ratio of GetSpeed() / GetWalkSpeed().
virtual void FaceTowardsPoint(entity_pos_t x, entity_pos_t z)=0
Turn to look towards the given point.
virtual void MoveToFormationOffset(entity_id_t controller, entity_pos_t x, entity_pos_t z)=0
Join a formation, and move towards a given offset relative to the formation controller entity.
virtual std::string GetPassabilityClassName() const =0
Get the passability class name (as defined in pathfinder.xml)
virtual entity_pos_t GetUnitClearance() const =0
Get the unit clearance (used by the Obstruction component)
virtual void StopMoving()=0
Stop moving immediately.
virtual void SetFacePointAfterMove(bool facePointAfterMove)=0
Set whether the unit will turn to face the target point after finishing moving.
virtual CFixedVector2D EstimateFuturePosition(const fixed dt) const =0
virtual void SetAcceleration(fixed acceleration)=0
Set the current acceleration.
virtual fixed GetWalkSpeed() const =0
Get the unit template walk speed after modifications.
virtual void SetSpeedMultiplier(fixed multiplier)=0
Set the current movement speed.
virtual fixed GetAcceleration() const =0
Get the current acceleration.
virtual fixed GetSpeed() const =0
Get the speed at which the unit intends to move.
virtual fixed GetRunMultiplier() const =0
Get the unit template running (i.e.
virtual bool IsMoveRequested() const =0
virtual void SetPassabilityClassName(const std::string &passClassName)=0
Sets the passability class name (as defined in pathfinder.xml)
virtual fixed GetCurrentSpeed() const =0
Get the speed at the end of the current turn.
virtual pass_class_t GetPassabilityClass() const =0
Get the unit's passability class.
Definition: IComponent.h:33
u32 entity_id_t
Entity ID type.
Definition: Entity.h:29