|
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.Fog
Describes a a fog rendering effect.
All types of fog are reprensented in a single class. If the parameter type is not useful for the fog mode, it is ignored.
Field Summary | |
static int |
EXPONENTIAL
Set the fog mode to exponential curve |
static int |
EXPONENTIAL_2
Set the fog mode to exponential-squared curve |
static int |
LINEAR
Set the fog mode to linear |
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 | |
Fog()
Constructs a fog node with the default mode set to linear and the colour set to white. |
|
Fog(int mode)
Construct a fog using the given mode and the colour set to white. |
|
Fog(int mode,
float[] c)
Construct a fog using the given mode and colour. |
Method Summary | |
void |
getColor(float[] c)
Get the current drawing colour |
float |
getDensityRate()
Get the current decay rate. |
void |
getLinearDistance(float[] values)
Get the two distance values for the linear fog settings. |
protected void |
markBoundsDirty()
Mark this node as having dirty bounds due to one of it's children having their bounds changed. |
void |
renderState(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Issue ogl commands needed for this component |
void |
restoreState(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Restore all openGL state to the given drawable. |
void |
setColor(float[] c)
Change the fog colour to the new colour. |
void |
setDensityRate(float rate)
Set the exponential decay factor. |
void |
setLinearDistance(float start,
float end)
Set the distance functions for the fog when in linear mode. |
Methods inherited from class org.j3d.aviatrix3d.Node |
boundsChanged, checkForCyclicParent, getBounds, getParent, postRender, recomputeBounds, removeParent, render, 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 |
Field Detail |
public static final int EXPONENTIAL
public static final int EXPONENTIAL_2
public static final int LINEAR
Constructor Detail |
public Fog()
public Fog(int mode)
public Fog(int mode, float[] c)
Method Detail |
public void renderState(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
gl
- The gl context to draw withglu
- The utility context to draw withpublic void restoreState(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
gl
- The gl context to draw withglu
- The utility context to draw withprotected void markBoundsDirty()
markBoundsDirty
in class Node
public void setColor(float[] c) throws InvalidWriteTimingException
c
- The colour to copy in
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic void getColor(float[] c)
c
- An array of length 3 or more to copy the colour topublic void setLinearDistance(float start, float end) throws InvalidWriteTimingException
start
- The closest distance that fog starts atend
- The distance that the fog is fully opaque at
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic void getLinearDistance(float[] values)
values
- An array to copy the values intopublic void setDensityRate(float rate) throws InvalidWriteTimingException
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic float getDensityRate()
|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |