Aviatrix3D 1.0

org.j3d.aviatrix3d
Class AmbientLight

java.lang.Object
  extended byorg.j3d.aviatrix3d.SceneGraphObject
      extended byorg.j3d.aviatrix3d.Node
          extended byorg.j3d.aviatrix3d.Leaf
              extended byorg.j3d.aviatrix3d.Light
                  extended byorg.j3d.aviatrix3d.AmbientLight
All Implemented Interfaces:
java.lang.Comparable, Renderable, RenderableComponent

public class AmbientLight
extends Light

Representation of a purely ambient light source with no other abilities.

An ambient light has no direction or location, but allows a base colour to be added to all objects within its influence. This class allows for the basic lighting abilities to be used, without needing to drag in any other sort of light source like the other derived light types do.

Version:
$Revision: 1.12 $
Author:
Justin Couch

Field Summary
 
Fields inherited from class org.j3d.aviatrix3d.Light
AMBIENT_TYPE, ambientColor, diffuseColor, DIRECTIONAL_TYPE, effectBounds, enabled, globalScope, POINT_TYPE, specularColor, SPOT_TYPE
 
Fields inherited from class org.j3d.aviatrix3d.Node
bounds, implicitBounds, INVALID_BOUNDS, parent
 
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject
alive, LISTENER_SET_NOT_LIVE_MESSAGE, updateHandler, WRITE_TIMING_MSG
 
Constructor Summary
AmbientLight()
          Creates a light with the colour set to black.
AmbientLight(float[] col)
          Create a light with the given base colour.Colour must be in the range [0, 1] otherwise an exception is generated.
 
Method Summary
 void postRender(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu, java.lang.Object lightId)
           
 void render(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu, java.lang.Object lightId)
          Overloaded form of the render() method to render the light details given the specific Light ID used by OpenGL.
 
Methods inherited from class org.j3d.aviatrix3d.Light
compareColor3, compareTo, compareTo, getAmbientColor, getDiffuseColor, getEffectBounds, getSpecularColor, isEnabled, isGlobalScope, setAmbientColor, setDiffuseColor, setEffectBounds, setEnabled, setGlobalScope, setSpecularColor
 
Methods inherited from class org.j3d.aviatrix3d.Node
boundsChanged, checkForCyclicParent, getBounds, getParent, markBoundsDirty, recomputeBounds, removeParent, setBounds, setLive, setParent, updateBounds, updateParentBounds
 
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

AmbientLight

public AmbientLight()
Creates a light with the colour set to black.


AmbientLight

public AmbientLight(float[] col)
             throws java.lang.IllegalArgumentException
Create a light with the given base colour.Colour must be in the range [0, 1] otherwise an exception is generated.

Parameters:
col - The new colour value to use
Throws:
java.lang.IllegalArgumentException - The colour value is out of range
Method Detail

render

public void render(net.java.games.jogl.GL gl,
                   net.java.games.jogl.GLU glu,
                   java.lang.Object lightId)
Overloaded form of the render() method to render the light details given the specific Light ID used by OpenGL. Since the active light ID for this node may vary over time, a fixed ID cannot be used by OpenGL. The renderer will always call this method rather than the normal render() method. The normal post render will still be called

Parameters:
gl - The GL context to render with
glu - The GL utility context to render with
lightId - the ID of the light to make GL calls with

postRender

public void postRender(net.java.games.jogl.GL gl,
                       net.java.games.jogl.GLU glu,
                       java.lang.Object lightId)

Aviatrix3D 1.0

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