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