net.jinx.action
Class VideoRenderer

java.lang.Object
  extended by net.jinx.action.Actor
      extended by net.jinx.action.VideoRenderer
All Implemented Interfaces:
IdleSensitive, OwnerListener, SceneListener

public class VideoRenderer
extends Actor
implements IdleSensitive, OwnerListener

VideoRenderer renders the visible Actors in a Scene using OpenGL and Vextex Modeler's internals (the net.jinx.video and net.jinx.video.model packages). Any Actor implementing net.jinx.video.Visible is used as a visible object. Any Actor implementing net.jinx.model.View is used as a View for a SplitScreenRenderer.

API Stability: Alpha.


Constructor Summary
VideoRenderer(java.lang.String name, javax.media.opengl.GLAutoDrawable glDraw, Context context)
          Constructs a new VideoRenderer that will render the visible Actors to the screen.
 
Method Summary
 void actorAdded(Actor actor, Scene scene)
          If actor is either a net.jinx.video.View or a net.jinx.video.Visible, then it will be added in for rendering.
 void actorRemoved(Actor actor, Scene scene)
          If actor is either a net.jinx.video.View or a net.jinx.video.Visible, then it will be removed from rendering.
 SplitScreenRenderer getRenderer()
          Provides the SplitScreenRenderer object that does all the actual work.
protected  void processEvent(ActorEvent event)
          Processes Clock related events.
 
Methods inherited from class net.jinx.action.Actor
checkAllowAdd, getName, getOwner, hashCode, ownerChanged, sendEvent, sendEvent, sendEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VideoRenderer

public VideoRenderer(java.lang.String name,
                     javax.media.opengl.GLAutoDrawable glDraw,
                     Context context)
Constructs a new VideoRenderer that will render the visible Actors to the screen.

Parameters:
name - the name of this VideoRenderer.
glDraw - the GLDrawable object that will be used for rendering.
context - the Context object holding rendering options.
Method Detail

getRenderer

public SplitScreenRenderer getRenderer()
Provides the SplitScreenRenderer object that does all the actual work.

Returns:
the SplitScreenRenderer.

actorAdded

public void actorAdded(Actor actor,
                       Scene scene)
If actor is either a net.jinx.video.View or a net.jinx.video.Visible, then it will be added in for rendering. If scene is not the same as the return value of getOwner() then actor will be ignored.

Specified by:
actorAdded in interface SceneListener
Parameters:
actor - the Actor to possibly add for rendering.
scene - the Scene object that actor came from.

actorRemoved

public void actorRemoved(Actor actor,
                         Scene scene)
If actor is either a net.jinx.video.View or a net.jinx.video.Visible, then it will be removed from rendering. If scene is not the same as the return value of getOwner() then actor will be ignored.

Specified by:
actorRemoved in interface SceneListener
Parameters:
actor - the Actor to possibly remove from rendering.
scene - the Scene object that actor came from.

processEvent

protected void processEvent(ActorEvent event)
Processes Clock related events. All others are ignored.

Specified by:
processEvent in class Actor
Parameters:
event - the ActorEvent to process.