de.enough.polish.ui.screenanimations
Class RotatingScreenM3GScreenChangeAnimation
java.lang.Object
javax.microedition.lcdui.Displayable
javax.microedition.lcdui.Canvas
de.enough.polish.ui.Canvas
de.enough.polish.ui.ScreenChangeAnimation
de.enough.polish.ui.screenanimations.RotatingScreenM3GScreenChangeAnimation
- All Implemented Interfaces:
- Displayable, Runnable
public class RotatingScreenM3GScreenChangeAnimation
- extends ScreenChangeAnimation
A M3G powered 3D Y-axis rotating screen change animation
Renders in retained mode.
Note: steps are taken to accommodate the blocking delay that occurs when Image2D are created
- Author:
- Anders Bo Pedersen, anders@wicore.dk
| Fields inherited from class de.enough.polish.ui.ScreenChangeAnimation |
abort, animationBackwardFunction, animationDuration, animationForwardFunction, DEFAULT_DURATION, DIRECTION_BACKWARD, DIRECTION_FORWARD, display, isForwardAnimation, lastCanvasImage, lastCanvasRgb, lastContentX, lastContentY, lastDisplayable, nextCanvas, nextCanvasImage, nextCanvasRgb, nextContentX, nextContentY, nextDisplayable, screenHeight, screenWidth, startTime, supportsDifferentScreenSizes, useLastCanvasRgb, useNextCanvasRgb |
| Fields inherited from class de.enough.polish.ui.Canvas |
_commands, DOWN, FIRE, GAME_A, GAME_B, GAME_C, GAME_D, KEY_NUM0, KEY_NUM1, KEY_NUM2, KEY_NUM3, KEY_NUM4, KEY_NUM5, KEY_NUM6, KEY_NUM7, KEY_NUM8, KEY_NUM9, KEY_POUND, KEY_STAR, LEFT, RIGHT, UP |
| Methods inherited from class de.enough.polish.ui.ScreenChangeAnimation |
_keyPressed, _keyReleased, _keyRepeated, _pointerDragged, _pointerPressed, _pointerReleased, abort, calculateAnimationPoint, getNextDisplayable, hideNotify, paint, run, setStyle, showNotify, sizeChanged, toImage, updateNextScreen |
| Methods inherited from class de.enough.polish.ui.Canvas |
_hideNotify, _hideNotifyExternal, _showNotify, addCommand, getCommandListener, getCommands, getGameAction, getHeight, getKeyCode, getKeyName, getPolishTicker, getTitle, getWidth, handlePointerTouchDown, handlePointerTouchUp, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, hideNotifyExternal, isDoubleBuffered, isShown, keyPressed, keyReleased, keyRepeated, pointerDragged, pointerPressed, pointerReleased, removeCommand, repaint, setCommandListener, setFullScreenMode, setTicker, setTitle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
g3d
protected javax.microedition.m3g.Graphics3D g3d
texMatrixOne
protected static TexturePlane texMatrixOne
texMatrixTwo
protected static TexturePlane texMatrixTwo
texPlaneRoot
protected static javax.microedition.m3g.Group texPlaneRoot
sceneBG
protected javax.microedition.m3g.Background sceneBG
scene
protected static javax.microedition.m3g.World scene
rotateDirection
protected boolean rotateDirection
rotateYAngle
protected float rotateYAngle
scaleFactor
protected float scaleFactor
RotatingScreenM3GScreenChangeAnimation
public RotatingScreenM3GScreenChangeAnimation()
animate
protected boolean animate(long passedTime,
long duration)
- Description copied from class:
ScreenChangeAnimation
- Animates this animation.
- Specified by:
animate in class ScreenChangeAnimation
- Parameters:
passedTime - the passed time in millisecondsduration - the maximum duration of this animation
- Returns:
- true when the animation should continue, when false is returned the animation
will be stopped and the next screen will be shown instead.
- See Also:
ScreenChangeAnimation.calculateAnimationPoint(int, int, long, long)
paintAnimation
protected void paintAnimation(Graphics g)
- Description copied from class:
ScreenChangeAnimation
- Paints the animation.
- Specified by:
paintAnimation in class ScreenChangeAnimation
- Parameters:
g - the graphics context
onShow
protected void onShow(Style style,
Display dsplay,
int width,
int height,
Displayable lstDisplayable,
Displayable nxtDisplayable,
boolean isForward)
- Description copied from class:
ScreenChangeAnimation
- Starts the animation.
Please note that an animation can be re-used for several screens.
At the end of starting animation(long,long) is called before the painting starts.
- Overrides:
onShow in class ScreenChangeAnimation
- Parameters:
style - the associated style.dsplay - the display, which is used for setting this animationwidth - the screen's widthheight - the screen's heightlstDisplayable - the screen that has been shown until nownxtDisplayable - the next screen that should be displayed when this animation finishes (as a Displayable)isForward - true when the animation should run in the normal direction/mode - false if it should run backwards