Aviatrix3D
2.1.0

org.j3d.aviatrix3d
Class AmbientLight

java.lang.Object
  extended by org.j3d.aviatrix3d.SceneGraphObject
      extended by org.j3d.aviatrix3d.Node
          extended by org.j3d.aviatrix3d.Leaf
              extended by org.j3d.aviatrix3d.Light
                  extended by org.j3d.aviatrix3d.AmbientLight
All Implemented Interfaces:
java.lang.Comparable, CascadeRenderable, ComponentRenderable, Cullable, EffectRenderable, LeafCullable, Renderable

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.16 $
Author:
Justin Couch

Field Summary
 
Fields inherited from class org.j3d.aviatrix3d.Light
AMBIENT_TYPE, ambientColor, diffuseColor, DIRECTIONAL_TYPE, effectBounds, enabled, globalOnly, INVALID_ALPHA_PROP, INVALID_BLUE_PROP, INVALID_GREEN_PROP, INVALID_RED_PROP, 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_TIMING_ERR_PROP, updateHandler
 
Fields inherited from interface org.j3d.aviatrix3d.rendering.LeafCullable
AUDIO_CULLABLE, CLIP_CULLABLE, FOG_CULLABLE, GEOMETRY_CULLABLE, LIGHT_CULLABLE, OVERRIDE_CULLABLE
 
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(javax.media.opengl.GL gl, java.lang.Object lightId)
           
 void render(javax.media.opengl.GL gl, 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, getCullableType, getDiffuseColor, getEffectBounds, getRenderable, getSpecularColor, isEnabled, isGlobalOnly, setAmbientColor, setDiffuseColor, setEffectBounds, setEnabled, setGlobalOnly, setSpecularColor
 
Methods inherited from class org.j3d.aviatrix3d.Node
boundsChanged, checkForCyclicParent, getBounds, getParent, markBoundsDirty, recomputeBounds, removeParent, requestBoundsUpdate, setBounds, setParent, updateBounds, updateParentBounds
 
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject
checkForCyclicChild, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setLive, setUpdateHandler, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.j3d.aviatrix3d.rendering.LeafCullable
getBounds
 
Methods inherited from interface org.j3d.aviatrix3d.rendering.Renderable
equals
 

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. Automatically

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(javax.media.opengl.GL gl,
                   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
lightId - the ID of the light to make GL calls with

postRender

public void postRender(javax.media.opengl.GL gl,
                       java.lang.Object lightId)

Aviatrix3D
2.1.0

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