18 #ifndef INCLUDED_ICMPPOSITION 19 #define INCLUDED_ICMPPOSITION 81 virtual std::set<entity_id_t>*
GetTurrets() = 0;
249 #endif // INCLUDED_ICMPPOSITION Definition: IComponent.h:32
A simple fixed-point number class.
Definition: Fixed.h:119
Definition: FixedVector2D.h:24
virtual bool CanFloat() const =0
Returns whether the entity can float on water.
virtual void GetInterpolatedPosition2D(float frameOffset, float &x, float &z, float &rotY) const =0
Get the current interpolated 2D position and orientation, for rendering.
virtual CFixedVector2D GetPosition2D() const =0
Returns the current x,z position (no interpolation).
virtual CMatrix3D GetInterpolatedTransform(float frameOffset) const =0
Get the current interpolated transform matrix, for rendering.
virtual fixed GetDistanceTravelled() const =0
Returns the distance that the unit will be interpolated over, i.e.
virtual bool IsHeightRelative() const =0
Returns true iff the entity will follow the terrain height (possibly with an offset) ...
Represents an entity's position in the world (plus its orientation).
Definition: ICmpPosition.h:60
virtual void MoveAndTurnTo(entity_pos_t x, entity_pos_t z, entity_angle_t ry)=0
Combines MoveTo and TurnTo to avoid an uncessary "AdvertisePositionChange".
virtual CFixedVector3D GetRotation() const =0
Returns the current rotation (relative to the upwards axis), as Euler angles with X=pitch...
virtual CFixedVector2D GetPreviousPosition2D() const =0
Returns the previous turn's x,z position (no interpolation).
virtual CFixedVector3D GetPosition() const =0
Returns the current x,y,z position (no interpolation).
virtual void SetTurretParent(entity_id_t parent, const CFixedVector3D &offset)=0
Set this as a turret of an other entity.
virtual void SetHeightRelative(bool flag)=0
When set to true, the entity will follow the terrain height (possibly with an offset) When set to fal...
virtual bool IsInWorld() const =0
Returns true if the entity currently exists at a defined position in the world.
virtual void SetConstructionProgress(fixed progress)=0
Set construction progress of the model, this affects the rendered position of the model...
virtual entity_pos_t GetHeightFixed() const =0
Returns the current vertical offset above above the map zero point.
virtual entity_id_t GetTurretParent() const =0
Get the turret parent of this entity.
Definition: Matrix3D.h:33
virtual void MoveOutOfWorld()=0
Causes IsInWorld to return false.
virtual entity_pos_t GetHeightAtFixed(entity_pos_t x, entity_pos_t z) const =0
Returns the vertical offset above above the map zero point the unit would have at the given position...
virtual void SetYRotation(entity_angle_t y)=0
Rotate immediately to the given angle around the upwards axis.
virtual void SetActorFloating(bool flag)=0
Set the entity to float on water, in a non-network-synchronised visual-only way.
virtual void TurnTo(entity_angle_t y)=0
Rotate smoothly to the given angle around the upwards axis.
Definition: FixedVector3D.h:24
virtual void SetFloating(bool flag)=0
Set the entity to float on water.
#define DECLARE_INTERFACE_TYPE(iname)
Definition: Interface.h:23
virtual void MoveTo(entity_pos_t x, entity_pos_t z)=0
Move smoothly to the given location.
virtual CFixedVector3D GetPreviousPosition() const =0
Returns the previous turn's x,y,z position (no interpolation).
virtual fixed GetTurnRate() const =0
Returns the turn rate in radians per second.
virtual void JumpTo(entity_pos_t x, entity_pos_t z)=0
Move immediately to the given location, with no interpolation.
virtual entity_pos_t GetHeightOffset() const =0
Returns the current vertical offset above the terrain/water surface.
virtual void UpdateTurretPosition()=0
Has to be called to update the simulation position of the turret.
u32 entity_id_t
Entity ID type.
Definition: Entity.h:23
virtual void SetHeightOffset(entity_pos_t dy)=0
Set the vertical offset above the terrain/water surface.
virtual std::set< entity_id_t > * GetTurrets()=0
Get the list of turrets to read or edit.
virtual void SetHeightFixed(entity_pos_t y)=0
Set the vertical position above the map zero point.
virtual void SetXZRotation(entity_angle_t x, entity_angle_t z)=0
Rotate immediately to the given angles around the X (pitch) and Z (roll) axes.