LuciadCPillar C# 2023.1.04
Luciad.Animations.IAnimation Interface Reference

An animation that can be added to AnimationManager. More...

Public Member Functions

System.TimeSpan GetDuration ()
 Returns the duration of this animation in milliseconds. More...
 
bool IsLooping ()
 Returns if this animation is a looping animation. More...
 
void OnStart ()
 This method is called when the animation is started. More...
 
void OnStop ()
 This method is called when the animation is stopped. More...
 
bool OnUpdate (double fraction)
 This method is called to update the animation. More...
 

Detailed Description

An animation that can be added to AnimationManager.

An animation is modeled as a function that takes a value between 0 and 1 as input. 0: the start of the animation 1: the end of the animation

AnimationManager generates this value using a duration that is assigned to the animation and the elapsed time at the moment the animation is updated. 2021.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IAnimation.

Member Function Documentation

◆ GetDuration()

System.TimeSpan Luciad.Animations.IAnimation.GetDuration ( )

Returns the duration of this animation in milliseconds.

This information is used by AnimationManager. In practice, this means that the IAnimation::onUpdate method is called with a value of 1.0 after this duration has elapsed. the duration of this animation in milliseconds.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IAnimation::getDuration.

◆ IsLooping()

bool Luciad.Animations.IAnimation.IsLooping ( )

Returns if this animation is a looping animation.

This information is used by AnimationManager. If false, the animation is automatically stopped and removed once the duration has elapsed. Otherwise, the animation will continue as long as luciad::IAnimation::onUpdate returns true. In case of a looping animation, the fraction that is passed to the luciad::IAnimation::onUpdate restarts at 0 once the animation has completed and progresses again towards 1. if this animation is a looping animation.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IAnimation::isLooping.

◆ OnStart()

void Luciad.Animations.IAnimation.OnStart ( )

This method is called when the animation is started.

No onUpdate call will be performed before this method is called. This method is not supposed to call luciad::IAnimation::onUpdate itself.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IAnimation::onStart.

◆ OnStop()

void Luciad.Animations.IAnimation.OnStop ( )

This method is called when the animation is stopped.

No luciad::IAnimation::onUpdate call will be performed after this method is called. This method is not supposed to call luciad::IAnimation::onUpdate itself. Note that this method may be called before the animation has finished. This can for example happen when an animation is canceled.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IAnimation::onStop.

◆ OnUpdate()

bool Luciad.Animations.IAnimation.OnUpdate ( double  fraction)

This method is called to update the animation.

This method will typically perform an action, e.g. update the camera location.

fraction

The position where you are located in the animation. This position varies from 0 to 1 (0 and 1 are included).

if the action needs to continue. Returning false stops the animation and triggers a call to the onStop method.

luciad::InvalidArgumentException

when the fraction value is invalid.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::IAnimation::onUpdate.