|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectm3g11.UvAnimation
public class UvAnimation
Encapsulates a UV animation. UV animations display sequences of images by modifying texture coordinates.
| Field Summary | |
|---|---|
private javax.microedition.m3g.AnimationController |
controller
Controller for animation. |
private int |
duration
Duration of animation. |
| Constructor Summary | |
|---|---|
protected |
UvAnimation(javax.microedition.m3g.AnimationController controller,
int duration)
Protected because a new UvAnimation object must be
created with one of the static create methods. |
| Method Summary | |
|---|---|
private static UvAnimation |
createAnimation(javax.microedition.m3g.Mesh mesh,
javax.microedition.m3g.Image2D image,
javax.microedition.m3g.KeyframeSequence sequence,
float scaleX,
float scaleY)
Creates a UV animation based on the given parameters. |
static UvAnimation |
createConveyorBeltAnimation(javax.microedition.m3g.Mesh mesh,
javax.microedition.m3g.Image2D image,
int duration,
float scaleX)
Creates an animation where an image is scrolled horizontally as if it were attached to a conveyor belt. |
static UvAnimation |
createFlipBookAnimation(javax.microedition.m3g.Mesh mesh,
javax.microedition.m3g.Image2D image,
int delay,
int framesX,
int framesY)
Creates an animation where frames inside an image are displayed successively like in a flip-book animation. |
void |
playBackward(int worldTime)
Plays the animation in backward direction. |
void |
playForward(int worldTime)
Plays the animation in forward direction. |
void |
stop()
Stops the animation. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private javax.microedition.m3g.AnimationController controller
private int duration
| Constructor Detail |
|---|
protected UvAnimation(javax.microedition.m3g.AnimationController controller,
int duration)
UvAnimation object must be
created with one of the static create methods.
controller - animation controller.duration - duration of animation.createConveyorBeltAnimation(javax.microedition.m3g.Mesh, javax.microedition.m3g.Image2D, int, float),
createFlipBookAnimation(javax.microedition.m3g.Mesh, javax.microedition.m3g.Image2D, int, int, int)| Method Detail |
|---|
private static UvAnimation createAnimation(javax.microedition.m3g.Mesh mesh,
javax.microedition.m3g.Image2D image,
javax.microedition.m3g.KeyframeSequence sequence,
float scaleX,
float scaleY)
mesh - mesh to use for UV animation.image - image to use for UV animation.sequence - animation sequence.scaleX - scaling factor of texture in x direction.scaleY - scaling factor of texture in y direction.
public static UvAnimation createConveyorBeltAnimation(javax.microedition.m3g.Mesh mesh,
javax.microedition.m3g.Image2D image,
int duration,
float scaleX)
mesh - mesh to use for UV animation.image - image to use for UV animation.duration - duration of one entire rotation.scaleX - scaling factor of texture in x direction.
public static UvAnimation createFlipBookAnimation(javax.microedition.m3g.Mesh mesh,
javax.microedition.m3g.Image2D image,
int delay,
int framesX,
int framesY)
mesh - mesh to use for UV animation.image - image to use for UV animation.delay - delay between successive frames.framesX - number of frames inside the image in x direction.framesY - number of frames inside the image in y direction.
public void stop()
public void playForward(int worldTime)
worldTime - current world time.public void playBackward(int worldTime)
worldTime - current world time.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||