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

The AnimationSystemRealTime is a special version of AnimationSystem that is designed to use system time for animations. More...

#include <AnimationSystemRealTime.h>

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

Public Member Functions

status_t updateLocalTime (globalTimeStamp_t systemTime=0u)
 Sets the local animation system to a given time. The time used should always be system time, because the renderer uses the system time implicitly. Slight offset can be used to delay or hide latency of the distribution system. More...
 
- Public Member Functions inherited from ramses::AnimationSystem
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...
 

Protected Member Functions

status_t setTime (globalTimeStamp_t timeStamp)
 Hidden method from AnimationSystem base class as time cannot be set to AnimationSystemRealTime. More...
 
 AnimationSystemRealTime (AnimationSystemImpl &pimpl)
 Constructor of the animation system. More...
 
 AnimationSystemRealTime (const AnimationSystemRealTime &other)
 Copy constructor of animation system. More...
 
AnimationSystemRealTimeoperator= (const AnimationSystemRealTime &other)
 Assignment operator of animation system. More...
 
virtual ~AnimationSystemRealTime ()
 Destructor of the animation system. More...
 
- Protected Member Functions inherited from ramses::AnimationSystem
 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...
 

Additional Inherited Members

- Public Attributes inherited from ramses::AnimationSystem
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
 

Detailed Description

The AnimationSystemRealTime is a special version of AnimationSystem that is designed to use system time for animations.

In a Ramses distributed system the client and the renderer have their own copies of animation system. Real time animation system guarantees smooth animations without stuttering by giving the control of time updates to the renderer. The renderer updates the animation system using system time every frame.

The client animation system does not have to worry about updates as long as it is not making changes to the states and properties. Many animation related commands rely on the current time of the local animation system, it uses it as time stamp for some commands that are then distributed to the renderer. Therefore it is important to properly update the time of the local animation system before any change is made.

Examples
ramses-example-basic-animation-realtime/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.

Constructor & Destructor Documentation

◆ AnimationSystemRealTime() [1/2]

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

Constructor of the animation system.

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

◆ AnimationSystemRealTime() [2/2]

ramses::AnimationSystemRealTime::AnimationSystemRealTime ( const AnimationSystemRealTime other)
protected

Copy constructor of animation system.

Parameters
[in]otherOther instance of animation system class

◆ ~AnimationSystemRealTime()

virtual ramses::AnimationSystemRealTime::~AnimationSystemRealTime ( )
protectedvirtual

Destructor of the animation system.

Member Function Documentation

◆ operator=()

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

Assignment operator of animation system.

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

◆ setTime()

status_t ramses::AnimationSystemRealTime::setTime ( globalTimeStamp_t  timeStamp)
protected

Hidden method from AnimationSystem base class as time cannot be set to AnimationSystemRealTime.

Parameters
[in]timeStampExplicit time cannot be used with AnimationSystemRealTime
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ updateLocalTime()

status_t ramses::AnimationSystemRealTime::updateLocalTime ( globalTimeStamp_t  systemTime = 0u)

Sets the local animation system to a given time. The time used should always be system time, because the renderer uses the system time implicitly. Slight offset can be used to delay or hide latency of the distribution system.

Parameters
[in]systemTimeThe time stamp to be set in the local animation system. If 0 then system time is used.
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-basic-animation-realtime/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.

Friends And Related Function Documentation

◆ SceneImpl

friend class SceneImpl
friend

SceneImpl is the factory for creating animation system instances.


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