|
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.ClipPlane
Representation of a single clip plane that can be used to clip a model in addition to the normal view volume clipping.
ClipPlane objects may be placed at any point in the scene graph heirarchy and is effected by all parent transforms. Each clip plane is accumulated and pushed to the leaf node, in a similar manner that lights are. As such, there is no requirement to provide the clip plane index as this will be assigned automatically at rendering time. A benefit of this feature is that it allows you to specify several different clip planes at different locations in the heirarchy and have them apply to the local coordinate system.
The external data passed to the RenderableComponent calls shall be an
Integer
instance that represents the GL identifier of the
clip plane (GL_CLIPPLANE0 + i) this instance is working with.
Field Summary |
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 | |
ClipPlane()
Creates a new clip plane using the default plane equation. |
Method Summary | |
int |
compareTo(ClipPlane cp)
Compares this object with the specified object for order. |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
void |
getPlaneEquation(double[] eq)
Retrieve the current plane equation values. |
boolean |
isEnabled()
Get the current enabled state of the light. |
void |
postRender(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu,
java.lang.Object planeId)
Overloaded form of the postRender() method to render the clip details given the specific clip plane ID used by OpenGL. |
void |
render(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu,
java.lang.Object planeId)
Overloaded form of the render() method to render the clip details given the specific clip plane ID used by OpenGL. |
void |
setEnabled(boolean state)
Set the enabled state of the light. |
void |
setPlaneEquation(double[] eq)
Set the plane equation to the new value. |
Methods inherited from class org.j3d.aviatrix3d.Node |
boundsChanged, checkForCyclicParent, getBounds, getParent, markBoundsDirty, 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 ClipPlane()
Method Detail |
public int compareTo(java.lang.Object o) throws java.lang.ClassCastException
Derived classes should extend this one to add the extra comparisons needed.
compareTo
in interface java.lang.Comparable
o
- The object to be compared
java.lang.ClassCastException
- The specified object's type prevents it from
being compared to this Objectpublic void render(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu, java.lang.Object planeId)
render
in interface RenderableComponent
gl
- The GL context to render withglu
- The GL utility context to render withplaneId
- the ID of the plane to make GL calls withpublic void postRender(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu, java.lang.Object planeId)
postRender
in interface RenderableComponent
gl
- The GL context to render withglu
- The GL utility context to render withplaneId
- the ID of the plane to make GL calls withpublic void setEnabled(boolean state) throws InvalidWriteTimingException
state
- The new state of the light
InvalidWriteTimingException
public boolean isEnabled()
public void setPlaneEquation(double[] eq) throws java.lang.IllegalArgumentException, InvalidWriteTimingException
eq
- The new equation values to use
java.lang.IllegalArgumentException
- The array is not at least 4 items long
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic void getPlaneEquation(double[] eq)
eq
- An array to copy the equation values intopublic int compareTo(ClipPlane cp)
cp
- The plane instance to be compared
|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |