IEntity

Functions

SET_CID

RED_RC

SetGeometry

RED_RC

AddAnimation

RED_RC

ClearAnimations

bool

HasAnimation

RED_RC

BlendAnimationTo

RED_RC

SetAnimationLoop

RED_RC

IsAnimationLoop

RED_RC

SetAnimationSpeed

RED_RC

GetAnimationSpeed

RED_RC

JumpAnimationToTime

RED_RC

GetAnimationCurrentTime

RED_RC

GetAnimationDuration

RED_RC

IsAnimationEndReached

Detailed Description

class IEntity : public RED::IREDObject

Public Functions

SET_CID(CID_class_ARTIEntity)
virtual RED_RC SetGeometry(RED::Object *iGeometry) = 0

Sets the geometry to animate.

Parameters

iGeometry – geometry as ART::IGeometry.

Returns

RED_OK if the operation has succeeded,

RED_FAIL otherwise.

virtual RED_RC AddAnimation(RED::Object *iAnimation, bool iSetOwner) = 0

Adds an animation.

If iSetOwner is true, the entity deletes the animations when necessary.

Parameters
  • iAnimation – animation as RED::IAnimationController.

  • iSetOwner – true if the entity becomes the owner of the animation.

Returns

RED_OK if the operation has succeeded,

RED_FAIL otherwise.

virtual RED_RC ClearAnimations() = 0

Clears all the animations.

If the entity owns the animation, the animation objects are deleted.

Returns

RED_OK if the operation has succeeded,

RED_FAIL otherwise.

virtual bool HasAnimation(unsigned int iId) const = 0

Tests if the entity animation whose ID is iId exists.

Parameters

iId – ID of the animation object.

Returns

RED_OK if the operation has succeeded,

RED_FAIL otherwise.

virtual RED_RC BlendAnimationTo(unsigned int iId, double iDuration) = 0

Blends the current animation state to the animation whose ID is iId.

Parameters
  • iId – ID of the animation object.

  • iDuration – duration of the blending.

Returns

RED_OK if the operation has succeeded,

RED_FAIL otherwise.

virtual RED_RC SetAnimationLoop(unsigned int iId, bool iLoop) = 0

Sets the animation to loop.

Parameters
  • iId – ID of the animation object.

  • iLoop – true to loop.

Returns

RED_OK if the operation has succeeded,

RED_FAIL otherwise.

virtual RED_RC IsAnimationLoop(bool &oLoop, unsigned int iId) const = 0

Tests if the animation is looping.

Parameters
  • oLoop – returned loop mode.

  • iId – ID of the animation object.

Returns

RED_OK if the operation has succeeded,

RED_FAIL otherwise.

virtual RED_RC SetAnimationSpeed(unsigned int iId, double iSpeed) = 0

Sets the play speed of the animation.

Parameters
  • iId – ID of the animation object.

  • iSpeed – animation speed.

Returns

RED_OK if the operation has succeeded,

RED_FAIL otherwise.

virtual RED_RC GetAnimationSpeed(double &oSpeed, unsigned int iId) const = 0

Gets the animation speed.

Parameters
  • oSpeed – returned animation speed.

  • iId – ID of the animation object.

Returns

RED_OK if the operation has succeeded,

RED_FAIL otherwise.

virtual RED_RC JumpAnimationToTime(unsigned int iId, double iTime) = 0

Jumps to a given time in the animation.

Parameters
  • iId – ID of the animation object.

  • iTime – time to jump in the animation.

Returns

RED_OK if the operation has succeeded,

RED_FAIL otherwise.

virtual RED_RC GetAnimationCurrentTime(double &oTime, unsigned int iId) const = 0

Gets the current animation time.

Parameters
  • oTime – returned animation time.

  • iId – ID of the animation object.

Returns

RED_OK if the operation has succeeded,

RED_FAIL otherwise.

virtual RED_RC GetAnimationDuration(double &oDuration, unsigned int iId) const = 0

Gets the animation duration.

Parameters
  • oDuration – returned animation duration.

  • iId – ID of the animation object.

Returns

RED_OK if the operation has succeeded,

RED_FAIL otherwise.

virtual RED_RC IsAnimationEndReached(bool &oEndReached, unsigned int iId) const = 0

Tests if the end of the animation has been reached.

Parameters
  • oEndReached – returned true if the end was reached, false otherwise.

  • iId – ID of the animation object.

Returns

RED_OK if the operation has succeeded,

RED_FAIL otherwise.