net.jinx.video
Class DemoRotator

java.lang.Object
  extended by net.jinx.video.DemoRotator
All Implemented Interfaces:
MultipassVisible, Visible

public class DemoRotator
extends java.lang.Object
implements MultipassVisible

Simple Visible that just rotates another Visible for the purpose of seeing every angle. It rotates the encapsulated Visible by the rotation vector for every second that passes; each frame interpolates based on the amount of time that has passed since the draw method was first called.

API Stability: Stable.


Constructor Summary
DemoRotator(Visible drawable)
          Constructs a DemoRotator for the given Visible.
 
Method Summary
 void deinit(Context opt)
          Deinitializes this DemoRotator's children.
 void draw(Context opt)
          Renders this Visible to glDrawable.
 void drawPass(Context opt, Pass pass)
           
 float[] getRotation()
          Provides the rotation constant.
 Visible getVisible()
          Provides the Visible that will be used in rendering.
 void init(Context opt)
          Initializes this DemoRotator's children.
 void setRotation(float[] rotation)
          Sets the rotation constant that is added after each frame is rendered.
 void setVisible(Visible drawable)
          Sets the Visible used in rendering.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemoRotator

public DemoRotator(Visible drawable)
Constructs a DemoRotator for the given Visible.

Parameters:
drawable - the Visible.
Method Detail

setRotation

public void setRotation(float[] rotation)
Sets the rotation constant that is added after each frame is rendered.

Parameters:
rotation - the rotation vector.

getRotation

public float[] getRotation()
Provides the rotation constant.

Returns:
the rotation vector.

setVisible

public void setVisible(Visible drawable)
Sets the Visible used in rendering.

Parameters:
drawable - the Visible.

getVisible

public Visible getVisible()
Provides the Visible that will be used in rendering.

Returns:
the Visible.

init

public void init(Context opt)
Initializes this DemoRotator's children.

Specified by:
init in interface Visible
Parameters:
opt - describes the rendering options that are being used.

deinit

public void deinit(Context opt)
Deinitializes this DemoRotator's children.

Specified by:
deinit in interface Visible
Parameters:
opt - describes the rendering options that are being used.

draw

public void draw(Context opt)
Description copied from interface: Visible
Renders this Visible to glDrawable.

Specified by:
draw in interface Visible
Parameters:
opt - describes the rendering options that are being used.

drawPass

public void drawPass(Context opt,
                     Pass pass)
Specified by:
drawPass in interface MultipassVisible