BenQ Mobile

javax.microedition.m3g
Class KeyframeSequence

java.lang.Object
  extended byjavax.microedition.m3g.Object3D
      extended byjavax.microedition.m3g.KeyframeSequence

public class KeyframeSequence
extends Object3D

Encapsulates animation data as a sequence of time-stamped, vector-valued keyframes. Each keyframe represents the value of an animated quantity at a specific time instant.


Field Summary
static int CONSTANT
          A parameter to setRepeatMode, specifying that this sequence is to be played back just once and not repeated.
static int LINEAR
          A constructor parameter that specifies linear interpolation between keyframes.
static int LOOP
          A parameter to setRepeatMode, specifying that this sequence is to be repeated indefinitely.
static int SLERP
          A constructor parameter that specifies spherical linear interpolation of quaternions.
static int SPLINE
          A constructor parameter that specifies spline interpolation between keyframes.
static int SQUAD
          A constructor parameter that specifies spline interpolation of quaternions.
static int STEP
          A constructor parameter that specifies stepping from one keyframe value to the next.
 
Constructor Summary
KeyframeSequence(int numKeyframes, int numComponents, int interpolation)
          Constructs a new keyframe sequence with specified interpolation method, number of components per keyframe, and number of keyframes.
 
Method Summary
 int getDuration()
          Gets the duration of this sequence.
 int getRepeatMode()
          Retrieves the current repeat mode of this KeyframeSequence.
 void setDuration(int duration)
          Sets the duration of this sequence in sequence time units.
 void setKeyframe(int index, int time, float[] value)
          Sets the time position and value of the specified keyframe.
 void setRepeatMode(int mode)
          Sets the repeat mode of this KeyframeSequence.
 void setValidRange(int first, int last)
          Selects the range of keyframes that are included in the animation.
 
Methods inherited from class javax.microedition.m3g.Object3D
addAnimationTrack, animate, duplicate, find, getAnimationTrack, getAnimationTrackCount, getReferences, getUserID, getUserObject, removeAnimationTrack, setUserID, setUserObject
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINEAR

public static final int LINEAR
A constructor parameter that specifies linear interpolation between keyframes.

See Also:
Constant Field Values

SLERP

public static final int SLERP
A constructor parameter that specifies spherical linear interpolation of quaternions.

See Also:
Constant Field Values

SPLINE

public static final int SPLINE
A constructor parameter that specifies spline interpolation between keyframes.

See Also:
Constant Field Values

SQUAD

public static final int SQUAD
A constructor parameter that specifies spline interpolation of quaternions.

See Also:
Constant Field Values

STEP

public static final int STEP
A constructor parameter that specifies stepping from one keyframe value to the next.

See Also:
Constant Field Values

CONSTANT

public static final int CONSTANT
A parameter to setRepeatMode, specifying that this sequence is to be played back just once and not repeated.

See Also:
Constant Field Values

LOOP

public static final int LOOP
A parameter to setRepeatMode, specifying that this sequence is to be repeated indefinitely.

See Also:
Constant Field Values
Constructor Detail

KeyframeSequence

public KeyframeSequence(int numKeyframes,
                        int numComponents,
                        int interpolation)
Constructs a new keyframe sequence with specified interpolation method, number of components per keyframe, and number of keyframes.

Method Detail

setKeyframe

public void setKeyframe(int index,
                        int time,
                        float[] value)
Sets the time position and value of the specified keyframe.


setValidRange

public void setValidRange(int first,
                          int last)
Selects the range of keyframes that are included in the animation.


setDuration

public void setDuration(int duration)
Sets the duration of this sequence in sequence time units.


getDuration

public int getDuration()
Gets the duration of this sequence.


setRepeatMode

public void setRepeatMode(int mode)
Sets the repeat mode of this KeyframeSequence.


getRepeatMode

public int getRepeatMode()
Retrieves the current repeat mode of this KeyframeSequence.


BenQ Mobile

Copyright © 2006 BenQ Mobile GmbH & Co. OHG or respective copyright owner.
All Rights Reserved.
BenQ Corp. is a trademark licensee of Siemens AG.


For further information about Mobility Toolkit (MTK) visit our Developer Portal.