|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.Node
org.j3d.aviatrix3d.Leaf
org.j3d.aviatrix3d.Light
org.j3d.aviatrix3d.AmbientLight
Representation of a ambient light source.
An ambient light has no direction or location, but allows a base colour to be added to all objects within it's influence.
Field Summary |
Fields inherited from class org.j3d.aviatrix3d.Light |
diffuseColor, enabled, specularColor |
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 | |
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 |
getAmbientColor(float[] col)
Retrieve the current colour value from the light. |
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 |
postRender(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu,
int lightId)
|
void |
render(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
This method is called to render this node. |
void |
render(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu,
int lightId)
Overloaded form of the render() method to render the light details given the specific Light ID used by OpenGL. |
void |
setAmbientColor(float[] col)
Set the ambient colour to the new value. |
Methods inherited from class org.j3d.aviatrix3d.Light |
getDiffuseColor, getSpecularColor, isEnabled, setDiffuseColor, setEnabled, setSpecularColor |
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 |
public AmbientLight()
public AmbientLight(float[] col) throws java.lang.IllegalArgumentException
col
- The new colour value to useMethod Detail |
public void render(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu, int lightId)
render
in class Light
gl
- The GL context to render withglu
- The GL utility context to render withlightId
- the ID of the light to make GL calls withpublic void postRender(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu, int lightId)
postRender
in class Light
public void render(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
render
in class Node
gl
- The GL context to render withglu
- The GL utility context to render withpublic void postRender(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
postRender
in class Node
protected void markBoundsDirty()
markBoundsDirty
in class Node
public void setAmbientColor(float[] col) throws java.lang.IllegalArgumentException, InvalidWriteTimingException
col
- The new colour value to use
java.lang.IllegalArgumentException
- The colour value is out of range
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback method
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic void getAmbientColor(float[] col)
col
- An array to copy the colour value into
|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |