18 #ifndef INCLUDED_ICMPVISUAL 19 #define INCLUDED_ICMPVISUAL 87 virtual void SetVariant(
const CStr&
key,
const CStr& selection) = 0;
104 virtual void SelectAnimation(
const std::string& name,
bool once,
fixed speed,
const std::wstring& soundgroup) = 0;
154 virtual void SetVariable(
const std::string& name,
float value) = 0;
183 #endif // INCLUDED_ICMPVISUAL Definition: IComponent.h:33
A simple fixed-point number class.
Definition: Fixed.h:115
virtual bool HasConstructionPreview() const =0
Returns true if this entity should have a construction preview.
virtual std::wstring GetActorShortName() const =0
Return the short name of the actor that's being displayed, or the empty string on error...
virtual void SetVariant(const CStr &key, const CStr &selection)=0
Set the variant selection of the actor for a certain key.
virtual CUnit * GetUnit()=0
Returns the underlying unit of this visual actor.
Definition: Vector3D.h:28
virtual std::wstring GetProjectileActor() const =0
Return the filename of the actor to be used for projectiles from this unit, or the empty string if no...
virtual void SelectAnimation(const std::string &name, bool once, fixed speed, const std::wstring &soundgroup)=0
Start playing the given animation.
virtual u32 GetActorSeed() const =0
Get actor seed used for random variations.
virtual void Hotload(const VfsPath &name)=0
Called when an actor file has been modified and reloaded dynamically.
uint32_t u32
Definition: types.h:39
virtual void SetShadingColor(fixed r, fixed g, fixed b, fixed a)=0
Set the shading color that will be modulated with the model's textures.
virtual void ResetMoveAnimation(const std::string &name)=0
Ensures that the given animation will be used when it normally would be, removing reference to any an...
pthread_key_t key
Definition: wpthread.cpp:140
virtual CBoundingBoxAligned GetBounds() const =0
Get the world-space bounding box of the object's visual representation.
#define DECLARE_INTERFACE_TYPE(iname)
Definition: Interface.h:23
virtual void SetVariable(const std::string &name, float value)=0
Set an arbitrarily-named variable that the model may use to alter its appearance (e.g.
virtual CVector3D GetProjectileLaunchPoint() const =0
Return the exact position where a projectile should be launched from (based on the actor's ammo prop ...
virtual std::string GetAnimationName() const =0
Returns the name of the currently played animation.
virtual void SetAnimationSyncRepeat(fixed repeattime)=0
Adjust the speed of the current animation, so it can match simulation events.
virtual void ReplaceMoveAnimation(const std::string &name, const std::string &replace)=0
Replaces a specified animation with another.
Definition: BoundingBoxAligned.h:35
virtual void SetAnimationSyncOffset(fixed actiontime)=0
Adjust the offset of the current animation, so it can match simulation events.
Definition: BoundingBoxOriented.h:30
virtual void SelectMovementAnimation(fixed runThreshold)=0
Start playing the walk/run animations, scaled to the unit's movement speed.
virtual CBoundingBoxOriented GetSelectionBox() const =0
Get the oriented world-space bounding box of the object's visual representation, clipped at the Y=0 p...
virtual CVector3D GetPosition() const =0
Get the world-space position of the base point of the object's visual representation.
virtual void SetActorSeed(u32 seed)=0
Set actor seed for random variations and reload model.
The visual representation of an entity (typically an actor).
Definition: ICmpVisual.h:34