j3d.org Aviatrix3D

org.j3d.aviatrix3d
Class Viewpoint

java.lang.Object
  extended byorg.j3d.aviatrix3d.SceneGraphObject
      extended byorg.j3d.aviatrix3d.Node
          extended byorg.j3d.aviatrix3d.Leaf
              extended byorg.j3d.aviatrix3d.Viewpoint

public class Viewpoint
extends Leaf

A viewpoint into the scene.

Viewpoints have their own implicit directional light (a headlight) that is controlled separately to the normal in-scenegraph lights. Lights are scoped by default and thus having the viewpoint also have a light following it around is a pain to deal with, you can select on directly on the viewpoint itself. This light is always pointing down the Z axis in the local coordinate system.

Version:
$Revision: 1.11 $
Author:
Justin Couch

Field Summary
 
Fields inherited from class org.j3d.aviatrix3d.Node
bounds, implicitBounds, INVALID_BOUNDS, parent
 
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject
alive, updateHandler, WRITE_TIMING_MSG
 
Constructor Summary
Viewpoint()
          The default constructor where the headlight is implicitly turned off.
 
Method Summary
 boolean isHeadlightEnabled()
          Get the current state of the headlight usage.
protected  void markBoundsDirty()
          Mark this node as having dirty bounds due to one of it's children having their bounds changed.
 void postRender(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
           
 void render(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
          This method is called to render this node.
 void setHeadlightEnabled(boolean state)
          Turn the local headlight on/off.
 
Methods inherited from class org.j3d.aviatrix3d.Node
boundsChanged, checkForCyclicParent, getBounds, getParent, recomputeBounds, removeParent, setBounds, setLive, setParent, updateBounds
 
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject
checkForCyclicChild, dataChanged, getUserData, isLive, setUpdateHandler, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Viewpoint

public Viewpoint()
The default constructor where the headlight is implicitly turned off.

Method Detail

isHeadlightEnabled

public boolean isHeadlightEnabled()
Get the current state of the headlight usage.

Returns:
true if the headlight is currently active

setHeadlightEnabled

public void setHeadlightEnabled(boolean state)
                         throws InvalidWriteTimingException
Turn the local headlight on/off.

Parameters:
state - true to turn the light on
Throws:
InvalidWriteTimingException - An attempt was made to write outside of the NodeUpdateListener callback method

render

public void render(net.java.games.jogl.GL gl,
                   net.java.games.jogl.GLU glu)
This method is called to render this node. All openGL commands needed to render the node should be executed. Any transformations needed should be added to the transformation stack premultiplied. This method must be re-entrant as it can be called from multiple places at once.

Overrides:
render in class Node
Parameters:
gl - The gl context to draw with
glu - The utility context to draw with

postRender

public void postRender(net.java.games.jogl.GL gl,
                       net.java.games.jogl.GLU glu)
Overrides:
postRender in class Node

markBoundsDirty

protected void markBoundsDirty()
Mark this node as having dirty bounds due to one of it's children having their bounds changed.

Overrides:
markBoundsDirty in class Node

j3d.org Aviatrix3D

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - j3d.org