com.visioglobe.libVisioDevKit
Class VgAnimation

java.lang.Object
  extended by com.visioglobe.libVisioDevKit.VgReferenced
      extended by com.visioglobe.libVisioDevKit.VgAnimation

public class VgAnimation
extends VgReferenced

This interface handles engine animations. Time management is done per-instance, this means that when the animation is started it applies to all objects using it.


Field Summary
 
Fields inherited from class com.visioglobe.libVisioDevKit.VgReferenced
swigCMemOwn, swigRefPtr
 
Constructor Summary
VgAnimation()
           
VgAnimation(long cPtr, boolean cMemoryOwn)
          This constructor initializes an useless empty animation instance.
 
Method Summary
 void delete()
           
protected  void finalize()
           
static long getCPtr(VgAnimation obj)
           
 float getCursor()
          This method return the current cursor position in the animation's timeline.
 float getDuration()
          This method returns the duration of the animation (in seconds).
 boolean isPlaying()
          This method retruns a boolean value that tells whether the animation is currently playing.
 void pause()
          This method pauses the animation at it's current time value.
 void seek(float pTime)
          This method sets the animation's current time and forces an injection of the animation values.
 void start()
           
 void start(float pDelay)
           
 void start(float pDelay, float pStart)
           
 void start(float pDelay, float pStart, float pEnd)
           
 void start(float pDelay, float pStart, float pEnd, float pDuration)
          This method starts the animation.
 void stop()
          This method stops the animation and sets back the time value to 0.
 
Methods inherited from class com.visioglobe.libVisioDevKit.VgReferenced
getCPtr, getNbReferences, ref, unref
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VgAnimation

public VgAnimation(long cPtr,
                   boolean cMemoryOwn)
This constructor initializes an useless empty animation instance. To create an usable animation, animation descriptors (VgEngine::VgAnimationDescriptor) must be used and passed to the instance factory (VgEngine::VgInstanceFactory).


VgAnimation

public VgAnimation()
Method Detail

getCPtr

public static long getCPtr(VgAnimation obj)

finalize

protected void finalize()
Overrides:
finalize in class VgReferenced

delete

public void delete()
Overrides:
delete in class VgReferenced

start

public void start(float pDelay,
                  float pStart,
                  float pEnd,
                  float pDuration)
This method starts the animation.

Parameters:
pDelay - The delay to apply before effectively playing the animation in seconds. Default is 0.0.
pStart - The start time in the animation in seconds (if negative, the animation starts at it's current poisition). Default is -1.0.
pEnd - The targeted position in the animation (if negative, the animation ends when it's timeline ends). Default is -1.0.
pDuration - The time in seconds the animation will take to go from start to end (not including delay). If negative, means abs(end-start). Default is -1.0.
Note:
If start is greater than end, the animation will play backwards., An animation that has looping (forward or ping pong) has a never ending timeline. Such an animation started with a negative value for pEnd will play continuously untill stopped explicitly.

start

public void start(float pDelay,
                  float pStart,
                  float pEnd)

start

public void start(float pDelay,
                  float pStart)

start

public void start(float pDelay)

start

public void start()

stop

public void stop()
This method stops the animation and sets back the time value to 0.


pause

public void pause()
This method pauses the animation at it's current time value. Use start to resume animation playback, stop to reset the animation.


seek

public void seek(float pTime)
This method sets the animation's current time and forces an injection of the animation values.

Parameters:
pTime - The time value to set (will be clamped between 0 and duration)

isPlaying

public boolean isPlaying()
This method retruns a boolean value that tells whether the animation is currently playing.

Returns:
True if thae animation is playing, false if not.

getDuration

public float getDuration()
This method returns the duration of the animation (in seconds).

Returns:
The animation's duration.

getCursor

public float getCursor()
This method return the current cursor position in the animation's timeline.

Returns:
The current animation's

VisioDevKit 2.0, Visioglobe® 2013