RAMSES Documentation  27.0.130
Information for RAMSES users and developers
Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
ramses::AnimationSystem Class Reference

The AnimationSystem holds all animation related data. More...

#include <AnimationSystem.h>

Inheritance diagram for ramses::AnimationSystem:
[legend]
Collaboration diagram for ramses::AnimationSystem:
[legend]

Public Member Functions

status_t setTime (globalTimeStamp_t timeStamp)
 Sets the animation system to a given time. Any unsigned integral values that are used in an incrementing fashion can be used. This time stamp is distributed to renderer and can be used as a synchronization point. More...
 
globalTimeStamp_t getTime () const
 Gets the current animation system time. The time stamp retrieved is the time stamp that was previously set by calling setTime. More...
 
SplineStepBoolcreateSplineStepBool (const char *name=nullptr)
 Creates a spline in this animation system using bool data type and step interpolation. More...
 
SplineStepInt32createSplineStepInt32 (const char *name=nullptr)
 Creates a spline in this animation system using int32_t data type and step interpolation. More...
 
SplineStepFloatcreateSplineStepFloat (const char *name=nullptr)
 Creates a spline in this animation system using float data type and step interpolation. More...
 
SplineStepVector2fcreateSplineStepVector2f (const char *name=nullptr)
 Creates a spline in this animation system using Vector2f data type and step interpolation. More...
 
SplineStepVector3fcreateSplineStepVector3f (const char *name=nullptr)
 Creates a spline in this animation system using Vector3f data type and step interpolation. More...
 
SplineStepVector4fcreateSplineStepVector4f (const char *name=nullptr)
 Creates a spline in this animation system using Vector4f data type and step interpolation. More...
 
SplineStepVector2icreateSplineStepVector2i (const char *name=nullptr)
 Creates a spline in this animation system using Vector2i data type and step interpolation. More...
 
SplineStepVector3icreateSplineStepVector3i (const char *name=nullptr)
 Creates a spline in this animation system using Vector3i data type and step interpolation. More...
 
SplineStepVector4icreateSplineStepVector4i (const char *name=nullptr)
 Creates a spline in this animation system using Vector4i data type and step interpolation. More...
 
SplineLinearInt32createSplineLinearInt32 (const char *name=nullptr)
 Creates a spline in this animation system using int32_t data type and linear interpolation. More...
 
SplineLinearFloatcreateSplineLinearFloat (const char *name=nullptr)
 Creates a spline in this animation system using float data type and linear interpolation. More...
 
SplineLinearVector2fcreateSplineLinearVector2f (const char *name=nullptr)
 Creates a spline in this animation system using Vector2f data type and linear interpolation. More...
 
SplineLinearVector3fcreateSplineLinearVector3f (const char *name=nullptr)
 Creates a spline in this animation system using Vector3f data type and linear interpolation. More...
 
SplineLinearVector4fcreateSplineLinearVector4f (const char *name=nullptr)
 Creates a spline in this animation system using Vector4f data type and linear interpolation. More...
 
SplineLinearVector2icreateSplineLinearVector2i (const char *name=nullptr)
 Creates a spline in this animation system using Vector2i data type and linear interpolation. More...
 
SplineLinearVector3icreateSplineLinearVector3i (const char *name=nullptr)
 Creates a spline in this animation system using Vector3i data type and linear interpolation. More...
 
SplineLinearVector4icreateSplineLinearVector4i (const char *name=nullptr)
 Creates a spline in this animation system using Vector4i data type and linear interpolation. More...
 
SplineBezierInt32createSplineBezierInt32 (const char *name=nullptr)
 Creates a spline in this animation system using int32_t data type and Bezier interpolation. More...
 
SplineBezierFloatcreateSplineBezierFloat (const char *name=nullptr)
 Creates a spline in this animation system using float data type and Bezier interpolation. More...
 
SplineBezierVector2fcreateSplineBezierVector2f (const char *name=nullptr)
 Creates a spline in this animation system using Vector2f data type and Bezier interpolation. More...
 
SplineBezierVector3fcreateSplineBezierVector3f (const char *name=nullptr)
 Creates a spline in this animation system using Vector3f data type and Bezier interpolation. More...
 
SplineBezierVector4fcreateSplineBezierVector4f (const char *name=nullptr)
 Creates a spline in this animation system using Vector4f data type and Bezier interpolation. More...
 
SplineBezierVector2icreateSplineBezierVector2i (const char *name=nullptr)
 Creates a spline in this animation system using Vector2i data type and Bezier interpolation. More...
 
SplineBezierVector3icreateSplineBezierVector3i (const char *name=nullptr)
 Creates a spline in this animation system using Vector3i data type and Bezier interpolation. More...
 
SplineBezierVector4icreateSplineBezierVector4i (const char *name=nullptr)
 Creates a spline in this animation system using Vector4i data type and Bezier interpolation. More...
 
AnimationcreateAnimation (const AnimatedProperty &animatedProperty, const Spline &spline, const char *name=nullptr)
 Creates Animation that can animate given property using given spline. More...
 
AnimationSequencecreateAnimationSequence (const char *name=nullptr)
 Creates AnimationSequence that can hold references to multiple animations and control them together. More...
 
status_t destroy (AnimationObject &animationObject)
 Release an animation system object and its data. The object must be owned by this animation system. The reference to this object is no longer valid after it is destroyed. More...
 
AnimatedPropertycreateAnimatedProperty (const Node &propertyOwner, EAnimatedProperty property, EAnimatedPropertyComponent propertyComponent=EAnimatedPropertyComponent_All, const char *name=nullptr)
 Create a new animated property for Node. More...
 
AnimatedPropertycreateAnimatedProperty (const UniformInput &propertyOwner, const Appearance &appearance, EAnimatedPropertyComponent propertyComponent=EAnimatedPropertyComponent_All, const char *name=nullptr)
 Create a new animated property for Appearance's input. More...
 
AnimatedPropertycreateAnimatedProperty (const DataObject &propertyOwner, EAnimatedPropertyComponent propertyComponent=EAnimatedPropertyComponent_All, const char *name=nullptr)
 Create a new animated property for a DataObject. More...
 
uint32_t getNumberOfFinishedAnimationsSincePreviousUpdate () const
 Get number of animations that were finished in current update round. The animation system collects finished animations between current and previous setTime/updateLocalTime call. More...
 
const AnimationgetFinishedAnimationSincePreviousUpdate (uint32_t index) const
 Get animation that was finished in current update round. The animation system collects finished animations between current and previous setTime/updateLocalTime call. More...
 
AnimationgetFinishedAnimationSincePreviousUpdate (uint32_t index)
 Get animation that was finished in current update round. The animation system collects finished animations between current and previous setTime/updateLocalTime call. More...
 
const RamsesObjectfindObjectByName (const char *name) const
 Get an object from the animation system by name. More...
 
RamsesObjectfindObjectByName (const char *name)
 Get an object from the animation system by name. More...
 
- Public Member Functions inherited from ramses::SceneObject
sceneObjectId_t getSceneObjectId () const
 Returns scene object id which is automatically assigned at creation time of object and is unique within scope of one scene. More...
 
sceneId_t getSceneId () const
 Returns sceneid to which this object belongs to. More...
 
- Public Member Functions inherited from ramses::RamsesObject
const char * getName () const
 Returns the name of the object. More...
 
status_t setName (const char *name)
 Changes the name of the object. More...
 
ERamsesObjectType getType () const
 Gets type of the object. More...
 
bool isOfType (ERamsesObjectType type) const
 Checks if the object is of given type. More...
 
- Public Member Functions inherited from ramses::StatusObject
status_t validate () const
 Generates verbose validation of the object. More...
 
const char * getValidationReport (EValidationSeverity minSeverity=EValidationSeverity_Info) const
 Provides verbose report in human readable form generated by validate. More...
 
const char * getStatusMessage (status_t status) const
 Get the string description for a status provided by a RAMSES API function. More...
 
 StatusObject (const StatusObject &other)=delete
 Deleted copy constructor. More...
 
StatusObjectoperator= (const StatusObject &other)=delete
 Deleted copy assignment. More...
 

Public Attributes

class AnimationSystemImpl & impl
 
- Public Attributes inherited from ramses::SceneObject
class SceneObjectImpl & impl
 
- Public Attributes inherited from ramses::ClientObject
class ClientObjectImpl & impl
 
- Public Attributes inherited from ramses::RamsesObject
class RamsesObjectImpl & impl
 
- Public Attributes inherited from ramses::StatusObject
class StatusObjectImpl & impl
 

Protected Member Functions

 AnimationSystem (AnimationSystemImpl &pimpl)
 Constructor of the animation system. More...
 
 AnimationSystem (const AnimationSystem &other)
 Copy constructor of animation system. More...
 
AnimationSystemoperator= (const AnimationSystem &other)
 Assignment operator of animation system. More...
 
virtual ~AnimationSystem ()
 Destructor of the animation system. More...
 
- Protected Member Functions inherited from ramses::SceneObject
 SceneObject (SceneObjectImpl &pimpl)
 Constructor for SceneObject. More...
 
virtual ~SceneObject ()
 Destructor of the SceneObject. More...
 
- Protected Member Functions inherited from ramses::ClientObject
 ClientObject (ClientObjectImpl &pimpl)
 Constructor for ClientObject. More...
 
virtual ~ClientObject ()
 Destructor of the ClientObject. More...
 
- Protected Member Functions inherited from ramses::RamsesObject
 RamsesObject (RamsesObjectImpl &pimpl)
 Constructor for RamsesObject. More...
 
virtual ~RamsesObject ()
 Destructor of the RamsesObject. More...
 
- Protected Member Functions inherited from ramses::StatusObject
 StatusObject (StatusObjectImpl &pimpl)
 Constructor for StatusObject. More...
 
virtual ~StatusObject ()
 Destructor of the StatusObject. More...
 

Friends

class SceneImpl
 SceneImpl is the factory for creating animation system instances. More...
 

Detailed Description

The AnimationSystem holds all animation related data.

Examples
ramses-example-basic-animation/src/main.cpp, and ramses-example-basic-file-loading/src/main.cpp.

Constructor & Destructor Documentation

◆ AnimationSystem() [1/2]

ramses::AnimationSystem::AnimationSystem ( AnimationSystemImpl &  pimpl)
explicitprotected

Constructor of the animation system.

Parameters
[in]pimplInternal data for implementation specifics of AnimationSystem (sink - instance becomes owner)

◆ AnimationSystem() [2/2]

ramses::AnimationSystem::AnimationSystem ( const AnimationSystem other)
protected

Copy constructor of animation system.

Parameters
[in]otherOther instance of animation system class

◆ ~AnimationSystem()

virtual ramses::AnimationSystem::~AnimationSystem ( )
protectedvirtual

Destructor of the animation system.

Member Function Documentation

◆ createAnimatedProperty() [1/3]

AnimatedProperty* ramses::AnimationSystem::createAnimatedProperty ( const DataObject propertyOwner,
EAnimatedPropertyComponent  propertyComponent = EAnimatedPropertyComponent_All,
const char *  name = nullptr 
)

Create a new animated property for a DataObject.

Parameters
[in]propertyOwnerReference to an entity that contains data to animate.
[in]propertyComponentThe optional component to animate in case of vector property.
[in]nameThe optional name of the AnimatedProperty.
Returns
AnimatedProperty referring to DataObject, null on failure

◆ createAnimatedProperty() [2/3]

AnimatedProperty* ramses::AnimationSystem::createAnimatedProperty ( const Node propertyOwner,
EAnimatedProperty  property,
EAnimatedPropertyComponent  propertyComponent = EAnimatedPropertyComponent_All,
const char *  name = nullptr 
)

Create a new animated property for Node.

Parameters
[in]propertyOwnerReference to an entity that contains data to animate.
[in]propertyProperty to animate.
[in]propertyComponentThe optional component to animate in case of vector property.
[in]nameThe optional name of the AnimatedProperty.
Returns
AnimatedProperty referring to Node's property, null on failure
Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-basic-animation/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-client/src/main.cpp, ramses-example-local-displays/src/main.cpp, ramses-example-local-geometry-shaders/src/main.cpp, and ramses-example-local-viewport-link/src/main.cpp.

◆ createAnimatedProperty() [3/3]

AnimatedProperty* ramses::AnimationSystem::createAnimatedProperty ( const UniformInput propertyOwner,
const Appearance appearance,
EAnimatedPropertyComponent  propertyComponent = EAnimatedPropertyComponent_All,
const char *  name = nullptr 
)

Create a new animated property for Appearance's input.

Parameters
[in]propertyOwnerReference to an entity that contains data to animate.
[in]appearanceReference to the appearance to which the input belongs.
[in]propertyComponentThe optional component to animate in case of vector property.
[in]nameThe optional name of the AnimatedProperty.
Returns
AnimatedProperty referring to Appearance input, null on failure

◆ createAnimation()

Animation* ramses::AnimationSystem::createAnimation ( const AnimatedProperty animatedProperty,
const Spline spline,
const char *  name = nullptr 
)

◆ createAnimationSequence()

AnimationSequence* ramses::AnimationSystem::createAnimationSequence ( const char *  name = nullptr)

◆ createSplineBezierFloat()

SplineBezierFloat* ramses::AnimationSystem::createSplineBezierFloat ( const char *  name = nullptr)

Creates a spline in this animation system using float data type and Bezier interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineBezierInt32()

SplineBezierInt32* ramses::AnimationSystem::createSplineBezierInt32 ( const char *  name = nullptr)

Creates a spline in this animation system using int32_t data type and Bezier interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineBezierVector2f()

SplineBezierVector2f* ramses::AnimationSystem::createSplineBezierVector2f ( const char *  name = nullptr)

Creates a spline in this animation system using Vector2f data type and Bezier interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineBezierVector2i()

SplineBezierVector2i* ramses::AnimationSystem::createSplineBezierVector2i ( const char *  name = nullptr)

Creates a spline in this animation system using Vector2i data type and Bezier interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineBezierVector3f()

SplineBezierVector3f* ramses::AnimationSystem::createSplineBezierVector3f ( const char *  name = nullptr)

Creates a spline in this animation system using Vector3f data type and Bezier interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineBezierVector3i()

SplineBezierVector3i* ramses::AnimationSystem::createSplineBezierVector3i ( const char *  name = nullptr)

Creates a spline in this animation system using Vector3i data type and Bezier interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineBezierVector4f()

SplineBezierVector4f* ramses::AnimationSystem::createSplineBezierVector4f ( const char *  name = nullptr)

Creates a spline in this animation system using Vector4f data type and Bezier interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineBezierVector4i()

SplineBezierVector4i* ramses::AnimationSystem::createSplineBezierVector4i ( const char *  name = nullptr)

Creates a spline in this animation system using Vector4i data type and Bezier interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineLinearFloat()

SplineLinearFloat* ramses::AnimationSystem::createSplineLinearFloat ( const char *  name = nullptr)

◆ createSplineLinearInt32()

SplineLinearInt32* ramses::AnimationSystem::createSplineLinearInt32 ( const char *  name = nullptr)

Creates a spline in this animation system using int32_t data type and linear interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineLinearVector2f()

SplineLinearVector2f* ramses::AnimationSystem::createSplineLinearVector2f ( const char *  name = nullptr)

Creates a spline in this animation system using Vector2f data type and linear interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineLinearVector2i()

SplineLinearVector2i* ramses::AnimationSystem::createSplineLinearVector2i ( const char *  name = nullptr)

Creates a spline in this animation system using Vector2i data type and linear interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineLinearVector3f()

SplineLinearVector3f* ramses::AnimationSystem::createSplineLinearVector3f ( const char *  name = nullptr)

Creates a spline in this animation system using Vector3f data type and linear interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineLinearVector3i()

SplineLinearVector3i* ramses::AnimationSystem::createSplineLinearVector3i ( const char *  name = nullptr)

Creates a spline in this animation system using Vector3i data type and linear interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineLinearVector4f()

SplineLinearVector4f* ramses::AnimationSystem::createSplineLinearVector4f ( const char *  name = nullptr)

Creates a spline in this animation system using Vector4f data type and linear interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineLinearVector4i()

SplineLinearVector4i* ramses::AnimationSystem::createSplineLinearVector4i ( const char *  name = nullptr)

Creates a spline in this animation system using Vector4i data type and linear interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineStepBool()

SplineStepBool* ramses::AnimationSystem::createSplineStepBool ( const char *  name = nullptr)

Creates a spline in this animation system using bool data type and step interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineStepFloat()

SplineStepFloat* ramses::AnimationSystem::createSplineStepFloat ( const char *  name = nullptr)

Creates a spline in this animation system using float data type and step interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineStepInt32()

SplineStepInt32* ramses::AnimationSystem::createSplineStepInt32 ( const char *  name = nullptr)

Creates a spline in this animation system using int32_t data type and step interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineStepVector2f()

SplineStepVector2f* ramses::AnimationSystem::createSplineStepVector2f ( const char *  name = nullptr)

Creates a spline in this animation system using Vector2f data type and step interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineStepVector2i()

SplineStepVector2i* ramses::AnimationSystem::createSplineStepVector2i ( const char *  name = nullptr)

Creates a spline in this animation system using Vector2i data type and step interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineStepVector3f()

SplineStepVector3f* ramses::AnimationSystem::createSplineStepVector3f ( const char *  name = nullptr)

Creates a spline in this animation system using Vector3f data type and step interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineStepVector3i()

SplineStepVector3i* ramses::AnimationSystem::createSplineStepVector3i ( const char *  name = nullptr)

Creates a spline in this animation system using Vector3i data type and step interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineStepVector4f()

SplineStepVector4f* ramses::AnimationSystem::createSplineStepVector4f ( const char *  name = nullptr)

Creates a spline in this animation system using Vector4f data type and step interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ createSplineStepVector4i()

SplineStepVector4i* ramses::AnimationSystem::createSplineStepVector4i ( const char *  name = nullptr)

Creates a spline in this animation system using Vector4i data type and step interpolation.

Parameters
[in]nameThe optional name of the spline
Returns
Pointer to the created spline, null on failure

◆ destroy()

status_t ramses::AnimationSystem::destroy ( AnimationObject animationObject)

Release an animation system object and its data. The object must be owned by this animation system. The reference to this object is no longer valid after it is destroyed.

Parameters
[in]animationObjectAnimation object to be released.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ findObjectByName() [1/2]

RamsesObject* ramses::AnimationSystem::findObjectByName ( const char *  name)

Get an object from the animation system by name.

Parameters
[in]nameThe name of the object to get.
Returns
Pointer to the object if found, nullptr otherwise.

◆ findObjectByName() [2/2]

const RamsesObject* ramses::AnimationSystem::findObjectByName ( const char *  name) const

Get an object from the animation system by name.

Parameters
[in]nameThe name of the object to get.
Returns
Pointer to the object if found, nullptr otherwise.

◆ getFinishedAnimationSincePreviousUpdate() [1/2]

Animation* ramses::AnimationSystem::getFinishedAnimationSincePreviousUpdate ( uint32_t  index)

Get animation that was finished in current update round. The animation system collects finished animations between current and previous setTime/updateLocalTime call.

Parameters
[in]indexIndex of the finished animation. Use getNumberOfFinishedAnimationsSincePreviousUpdate() to get the count.
Returns
Animation finished in current update round.

◆ getFinishedAnimationSincePreviousUpdate() [2/2]

const Animation* ramses::AnimationSystem::getFinishedAnimationSincePreviousUpdate ( uint32_t  index) const

Get animation that was finished in current update round. The animation system collects finished animations between current and previous setTime/updateLocalTime call.

Parameters
[in]indexIndex of the finished animation. Use getNumberOfFinishedAnimationsSincePreviousUpdate() to get the count.
Returns
Animation finished in current update round.

◆ getNumberOfFinishedAnimationsSincePreviousUpdate()

uint32_t ramses::AnimationSystem::getNumberOfFinishedAnimationsSincePreviousUpdate ( ) const

Get number of animations that were finished in current update round. The animation system collects finished animations between current and previous setTime/updateLocalTime call.

Returns
Number of finished animations in current update round.

◆ getTime()

globalTimeStamp_t ramses::AnimationSystem::getTime ( ) const

Gets the current animation system time. The time stamp retrieved is the time stamp that was previously set by calling setTime.

Returns
Current time stamp of the animation system
Examples
ramses-example-basic-animation-realtime/src/main.cpp, and ramses-example-basic-file-loading/src/main.cpp.

◆ operator=()

AnimationSystem& ramses::AnimationSystem::operator= ( const AnimationSystem other)
protected

Assignment operator of animation system.

Parameters
[in]otherOther instance of animation system class
Returns
This instance after assignment

◆ setTime()

status_t ramses::AnimationSystem::setTime ( globalTimeStamp_t  timeStamp)

Sets the animation system to a given time. Any unsigned integral values that are used in an incrementing fashion can be used. This time stamp is distributed to renderer and can be used as a synchronization point.

Parameters
[in]timeStampThe global time stamp to be set in animation system
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-basic-animation/src/main.cpp, and ramses-example-basic-file-loading/src/main.cpp.

Friends And Related Function Documentation

◆ SceneImpl

friend class SceneImpl
friend

SceneImpl is the factory for creating animation system instances.

Member Data Documentation

◆ impl

class AnimationSystemImpl& ramses::AnimationSystem::impl

Stores internal data for implementation specifics of animation system.


The documentation for this class was generated from the following file: