org.j3d.aviatrix3d
Class AmbientLight
java.lang.Object
org.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.Node
org.j3d.aviatrix3d.Leaf
org.j3d.aviatrix3d.Light
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
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 |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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 withlightId
- the ID of the light to make GL calls with
postRender
public void postRender(javax.media.opengl.GL gl,
java.lang.Object lightId)
Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org