|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.aviatrix3d.SceneGraphObject org.j3d.aviatrix3d.Node org.j3d.aviatrix3d.Leaf org.j3d.aviatrix3d.ClipPlane
public class 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.
Rendering Implementation Tips
The external data passed to the ComponentRenderable calls shall be an
Integer
instance that represents the GL identifier of the
clip plane (GL_CLIPPLANE0 + i) this instance is working with.
See the EffectRenderable
interface for definition of the scoping
and effects bounds.
Internationalisation Resource Names
Field Summary |
---|
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 | |
---|---|
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. |
int |
getCullableType()
Get the type that this cullable represents. |
BoundingVolume |
getEffectBounds()
Get the current bounding volume that this light effects. |
void |
getPlaneEquation(double[] eq)
Retrieve the current plane equation values. |
Renderable |
getRenderable()
Get the child renderable of this object. |
boolean |
isEnabled()
Get the current enabled state of the light. |
boolean |
isGlobalOnly()
Get the current setting of the global-only flag. |
void |
postRender(javax.media.opengl.GL gl,
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(javax.media.opengl.GL gl,
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 |
setEffectBounds(BoundingVolume bounds)
Set the bounds that will effect the range of this light. |
void |
setEnabled(boolean state)
Set the enabled state of the light. |
void |
setGlobalOnly(boolean state)
Set the global scope 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, 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 |
---|
public ClipPlane()
Method Detail |
---|
public int getCullableType()
getCullableType
in interface LeafCullable
public Renderable getRenderable()
getRenderable
in interface LeafCullable
public boolean isEnabled()
isEnabled
in interface CascadeRenderable
public boolean isGlobalOnly()
isGlobalOnly
in interface EffectRenderable
public BoundingVolume getEffectBounds()
getEffectBounds
in interface EffectRenderable
public void render(javax.media.opengl.GL gl, java.lang.Object planeId)
render
in interface ComponentRenderable
gl
- The GL context to render withplaneId
- the ID of the plane to make GL calls withpublic void postRender(javax.media.opengl.GL gl, java.lang.Object planeId)
postRender
in interface ComponentRenderable
gl
- The GL context to render withplaneId
- the ID of the plane to make GL calls withpublic int compareTo(java.lang.Object o) throws java.lang.ClassCastException
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 setEnabled(boolean state) throws InvalidWriteTimingException
state
- The new state of the light
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data change callback methodpublic void setGlobalOnly(boolean state) throws InvalidWriteTimingException
state
- The new state of the light
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data change callback methodpublic void setEffectBounds(BoundingVolume bounds) throws InvalidWriteTimingException
bounds
- A volume to use or null to clear
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data change callback methodpublic 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 data change 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
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |