net.jinx.video
Class SceneGraph.SceneGraphElement

java.lang.Object
  extended by net.jinx.video.SceneGraph.SceneGraphElement
All Implemented Interfaces:
MultipassVisible, Visible
Enclosing class:
SceneGraph

public static class SceneGraph.SceneGraphElement
extends java.lang.Object
implements MultipassVisible

SceneGraphElement allows for the fixed translation, rotation and scaling of other Visible objects.

API Stability: Stable.


Constructor Summary
SceneGraph.SceneGraphElement(Visible drawable)
          Constructs a SceneGraphElement for drawable.
 
Method Summary
 void deinit(Context opt)
          Deinitializes this Visible, disposing of any resources that it may be using.
 void draw(Context opt)
          Renders this Visible to glDrawable.
 void drawPass(Context opt, Pass pass)
           
 float[] getPosition()
          Provides the translation vector.
 float[] getRotation()
          Provides the rotation vector.
 float[] getScale()
          Provides the scaling vector.
 Visible getVisible()
          Provides the Visible that this SceneGraphElement is attached to.
 void init(Context opt)
          Initializes this Visible, preparing it for rendering.
 void setPosition(float[] position)
          Sets the translation vector.
 void setRotation(float[] rotation)
          Sets the rotation vector.
 void setScale(float[] scale)
          Sets the scaling vector.
 void setVisible(Visible drawable)
          Sets the Visible that this SceneGraphElement will function for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SceneGraph.SceneGraphElement

public SceneGraph.SceneGraphElement(Visible drawable)
Constructs a SceneGraphElement for drawable.

Parameters:
drawable - the Visible to encapsulate.
Method Detail

init

public void init(Context opt)
Description copied from interface: Visible
Initializes this Visible, preparing it for rendering. If this Visible contains other Visibles, then their init methods MUST be called first. This is essential for DisplayList objects to function properly and efficiently.

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

deinit

public void deinit(Context opt)
Description copied from interface: Visible
Deinitializes this Visible, disposing of any resources that it may be using. If this Visible contains other Visibles, then their deinit methods MUST be called last. This is important for display lists.

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

setVisible

public void setVisible(Visible drawable)
Sets the Visible that this SceneGraphElement will function for.

Parameters:
drawable - the Visible to encapsulate.

getVisible

public Visible getVisible()
Provides the Visible that this SceneGraphElement is attached to.

Returns:
the Visible.

setPosition

public void setPosition(float[] position)
Sets the translation vector.

Parameters:
position - the vector.

getPosition

public float[] getPosition()
Provides the translation vector.

Returns:
the translation vector.

setRotation

public void setRotation(float[] rotation)
Sets the rotation vector.

Parameters:
rotation - the vector.

getRotation

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

Returns:
the vector.

setScale

public void setScale(float[] scale)
Sets the scaling vector.

Parameters:
scale - the vector.

getScale

public float[] getScale()
Provides the scaling vector.

Returns:
the vector.

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