Animation

Animation Class

Represents a scriptable Animation node.

Syntax

[Sansar.Script.Interface]
public class Animation : Sansar.Script.InstanceInterface

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Members

See Also: Inherited members from Sansar.Script.InstanceInterface.

Public Properties

[read-only]
 
IsValid bool . Whether or not this interface is valid. (Inherited from Sansar.Script.InstanceInterface.)

Public Methods

 
GetFrameCount () : int
Gets the frame count of the animation
 
GetParameters () : AnimationParameters
Gets the last applied parameters for the animation
 
IsPaused () : bool
Gets whether or not the animation is paused.
 
JumpToFrame (int) : ulong
Jump to frame. The animation will be set to the specified frame, and paused.
 
JumpToFrame (int, Sansar.Script.ScriptBase.OperationComplete) : ulong
Jump to frame. The animation will be set to the specified frame, and paused.
 
JumpToFrame (int, Action<Sansar.Script.OperationCompleteEvent>) : ulong
Jump to frame. The animation will be set to the specified frame, and paused.
 
Pause () : ulong
Pauses the animation.
 
Pause (Sansar.Script.ScriptBase.OperationComplete) : ulong
Pauses the animation.
 
Pause (Action<Sansar.Script.OperationCompleteEvent>) : ulong
Pauses the animation.
 
Play () : ulong
Plays the animation, without changing the current animation frame.
 
Play (Sansar.Script.ScriptBase.OperationComplete) : ulong
Plays the animation, without changing the current animation frame.
 
Play (AnimationParameters) : ulong
Plays the animation and applies the provided parameters.
 
Play (Action<Sansar.Script.OperationCompleteEvent>) : ulong
Plays the animation, without changing the current animation frame.
 
Play (AnimationParameters, Sansar.Script.ScriptBase.OperationComplete) : ulong
Plays the animation and applies the provided parameters.
 
Play (AnimationParameters, Action<Sansar.Script.OperationCompleteEvent>) : ulong
Plays the animation and applies the provided parameters.
 
Reset () : ulong
Resets the animation. The animation is paused and reset to frame 0 (or the RangeStartFrame if clamping is enabled).
 
Reset (Sansar.Script.ScriptBase.OperationComplete) : ulong
Resets the animation. The animation is paused and reset to frame 0 (or the RangeStartFrame if clamping is enabled).
 
Reset (AnimationParameters) : ulong
Resets the animation and applies the provided parameters.
 
Reset (Action<Sansar.Script.OperationCompleteEvent>) : ulong
Resets the animation. The animation is paused and reset to frame 0 (or the RangeStartFrame if clamping is enabled).
 
Reset (AnimationParameters, Sansar.Script.ScriptBase.OperationComplete) : ulong
Resets the animation and applies the provided parameters.
 
Reset (AnimationParameters, Action<Sansar.Script.OperationCompleteEvent>) : ulong
Resets the animation and applies the provided parameters.
 
SetParameters (AnimationParameters) : ulong
Sets the parameters for the animation. The parameters are applied immediately.
 
SetParameters (AnimationParameters, Sansar.Script.ScriptBase.OperationComplete) : ulong
Sets the parameters for the animation. The parameters are applied immediately.
 
SetParameters (AnimationParameters, Action<Sansar.Script.OperationCompleteEvent>) : ulong
Sets the parameters for the animation. The parameters are applied immediately.

Member Details

GetFrameCount Method

Gets the frame count of the animation

Syntax

[Sansar.Script.Interface]
public int GetFrameCount ()

Returns

Returns the total number of frames in the animation.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

GetParameters Method

Gets the last applied parameters for the animation

Syntax

[Sansar.Script.Interface]
public AnimationParameters GetParameters ()

Returns

Returns the current parameters.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

IsPaused Method

Gets whether or not the animation is paused.

Syntax

[Sansar.Script.Interface]
public bool IsPaused ()

Returns

A bool value indicating the pause state.

Remarks

 

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

JumpToFrame Method

Jump to frame. The animation will be set to the specified frame, and paused.

Syntax

[Sansar.Script.Interface]
public ulong JumpToFrame (int frame)

Parameters

frame
Frame to jump to.

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

JumpToFrame Method

Jump to frame. The animation will be set to the specified frame, and paused.

Syntax

[Sansar.Script.Interface]
public ulong JumpToFrame (int frame, Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

frame
Frame to jump to.
handler
Handler to be called when the event completes.

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

JumpToFrame Method

Jump to frame. The animation will be set to the specified frame, and paused.

Syntax

[Sansar.Script.Interface]
public ulong JumpToFrame (int frame, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

frame
Frame to jump to.
handler
Handler to be called when the event completes.

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Pause Method

Pauses the animation.

Syntax

[Sansar.Script.Interface]
public ulong Pause ()

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Pause Method

Pauses the animation.

Syntax

[Sansar.Script.Interface]
public ulong Pause (Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

handler
Handler to be called when the event completes.

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Pause Method

Pauses the animation.

Syntax

[Sansar.Script.Interface]
public ulong Pause (Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

handler
Handler to be called when the event completes.

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Play Method

Plays the animation, without changing the current animation frame.

Syntax

[Sansar.Script.Interface]
public ulong Play ()

Returns

Returns an internal event id.

Remarks

If the animation has PlaybackMode.PlayOnce and has finished playing, this will have no effect, the animation will have to be reset with Reset() first. To block until the method returns pass this to Sansar.Script.ScriptBase.WaitFor(Func<Action<Sansar.Script.EventData>,System.Boolean,Sansar.Script.IEventSubscription>) in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Play Method

Plays the animation, without changing the current animation frame.

Syntax

[Sansar.Script.Interface]
public ulong Play (Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

handler
Handler to be called when the event completes.

Returns

Returns an internal event id.

Remarks

If the animation has PlaybackMode.PlayOnce and has finished playing, this will have no effect, the animation will have to be reset with Reset() first. To block until the method returns pass this to Sansar.Script.ScriptBase.WaitFor(Func<Action<Sansar.Script.EventData>,System.Boolean,Sansar.Script.IEventSubscription>) in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Play Method

Plays the animation and applies the provided parameters.

Syntax

[Sansar.Script.Interface]
public ulong Play (AnimationParameters parameters)

Parameters

parameters
Animation parameters to apply.

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Play Method

Plays the animation, without changing the current animation frame.

Syntax

[Sansar.Script.Interface]
public ulong Play (Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

handler
Handler to be called when the event completes.

Returns

Returns an internal event id.

Remarks

If the animation has PlaybackMode.PlayOnce and has finished playing, this will have no effect, the animation will have to be reset with Reset() first. To block until the method returns pass this to Sansar.Script.ScriptBase.WaitFor(Func<Action<Sansar.Script.EventData>,System.Boolean,Sansar.Script.IEventSubscription>) in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Play Method

Plays the animation and applies the provided parameters.

Syntax

[Sansar.Script.Interface]
public ulong Play (AnimationParameters parameters, Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

parameters
Animation parameters to apply.
handler
Handler to be called when the event completes.

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Play Method

Plays the animation and applies the provided parameters.

Syntax

[Sansar.Script.Interface]
public ulong Play (AnimationParameters parameters, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

parameters
Animation parameters to apply.
handler
Handler to be called when the event completes.

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Reset Method

Resets the animation. The animation is paused and reset to frame 0 (or the RangeStartFrame if clamping is enabled).

Syntax

[Sansar.Script.Interface]
public ulong Reset ()

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Reset Method

Resets the animation. The animation is paused and reset to frame 0 (or the RangeStartFrame if clamping is enabled).

Syntax

[Sansar.Script.Interface]
public ulong Reset (Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

handler
Handler to be called when the event completes.

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Reset Method

Resets the animation and applies the provided parameters.

Syntax

[Sansar.Script.Interface]
public ulong Reset (AnimationParameters parameters)

Parameters

parameters
Animation parameters to apply.

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Reset Method

Resets the animation. The animation is paused and reset to frame 0 (or the RangeStartFrame if clamping is enabled).

Syntax

[Sansar.Script.Interface]
public ulong Reset (Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

handler
Handler to be called when the event completes.

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Reset Method

Resets the animation and applies the provided parameters.

Syntax

[Sansar.Script.Interface]
public ulong Reset (AnimationParameters parameters, Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

parameters
Animation parameters to apply.
handler
Handler to be called when the event completes.

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Reset Method

Resets the animation and applies the provided parameters.

Syntax

[Sansar.Script.Interface]
public ulong Reset (AnimationParameters parameters, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

parameters
Animation parameters to apply.
handler
Handler to be called when the event completes.

Returns

Returns an internal event id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetParameters Method

Sets the parameters for the animation. The parameters are applied immediately.

Syntax

[Sansar.Script.Interface]
public ulong SetParameters (AnimationParameters parameters)

Parameters

parameters
Animation parameters to apply.

Returns

Returns an internal event id.

Remarks

The range start frame will be clamped to the length of the animation, and the range end frame will be clamped between the range start frame and the end of the animation. To block until the method returns pass this to Sansar.Script.ScriptBase.WaitFor(Func<Action<Sansar.Script.EventData>,System.Boolean,Sansar.Script.IEventSubscription>) in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetParameters Method

Sets the parameters for the animation. The parameters are applied immediately.

Syntax

[Sansar.Script.Interface]
public ulong SetParameters (AnimationParameters parameters, Sansar.Script.ScriptBase.OperationComplete handler)

Parameters

parameters
Animation parameters to apply.
handler
Handler to be called when the event completes.

Returns

Returns an internal event id.

Remarks

The range start frame will be clamped to the length of the animation, and the range end frame will be clamped between the range start frame and the end of the animation. To block until the method returns pass this to Sansar.Script.ScriptBase.WaitFor(Func<Action<Sansar.Script.EventData>,System.Boolean,Sansar.Script.IEventSubscription>) in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

SetParameters Method

Sets the parameters for the animation. The parameters are applied immediately.

Syntax

[Sansar.Script.Interface]
public ulong SetParameters (AnimationParameters parameters, Action<Sansar.Script.OperationCompleteEvent> handler)

Parameters

parameters
Animation parameters to apply.
handler
Handler to be called when the event completes.

Returns

Returns an internal event id.

Remarks

The range start frame will be clamped to the length of the animation, and the range end frame will be clamped between the range start frame and the end of the animation. To block until the method returns pass this to Sansar.Script.ScriptBase.WaitFor(Func<Action<Sansar.Script.EventData>,System.Boolean,Sansar.Script.IEventSubscription>) in a coroutine.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.