|
Aviatrix3D 1.0 | ||||||||||
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.Shape3D
A Shape3D class wraps polygonal geometry and appearance information. into a single visual chunk.
By default, all shapes are pickable.
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_NOT_LIVE_MESSAGE, updateHandler, WRITE_TIMING_MSG |
Fields inherited from interface org.j3d.aviatrix3d.PickableObject |
COLLIDABLE_OBJECT, GENERAL_OBJECT, PROXIMITY_OBJECT, VISIBLE_OBJECT |
Constructor Summary | |
Shape3D()
Creates a shape with no geometry or appearance set. |
Method Summary | |
protected void |
checkForCyclicChild(SceneGraphObject parent)
Check to see if this node is the same reference as the passed node that is a parent of this node. |
Appearance |
getAppearance()
Get the current appearance associated with this shape. |
Geometry |
getGeometry()
Get the current geometry associated with this shape. |
int |
getPickMask()
Get the current pickable state mask of this object. |
boolean |
isVisible()
State check to see whether the geometry in it's current setup is visible. |
protected void |
markBoundsDirty()
Mark this node as having dirty bounds due to one of it's children having their bounds changed. |
void |
pickBatch(PickRequest[] reqs,
int numRequests)
Check for all intersections against this geometry and it's children to see if there is an intersection with the given set of requests. |
void |
pickSingle(PickRequest req)
Check for all intersections against this geometry and it's children to see if there is an intersection with the given set of requests. |
void |
postRender(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
|
protected void |
recomputeBounds()
Internal method to recalculate the implicit bounds of this Node. |
void |
render(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
This method is called to render this node. |
void |
requestBoundsUpdate()
Request a recomputation of the bounds of this object. |
void |
setAppearance(Appearance newApp)
Set the appearance for this shape. |
void |
setGeometry(Geometry newGeom)
Set the geometry for this shape. |
protected void |
setLive(boolean state)
Notification that this object is live now. |
void |
setPickMask(int state)
Set the node as being pickable currently using the given bit mask. |
protected void |
setUpdateHandler(NodeUpdateHandler handler)
Set the scenegraph update handler for this node. |
protected void |
updateBounds()
Update this node's bounds and then call the parent to update it's bounds. |
Methods inherited from class org.j3d.aviatrix3d.Node |
boundsChanged, checkForCyclicParent, getBounds, getParent, removeParent, setBounds, setParent, updateParentBounds |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
dataChanged, getUserData, isLive, setUserData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Shape3D()
Method Detail |
protected void updateBounds()
updateBounds
in class Node
protected void markBoundsDirty()
markBoundsDirty
in class Node
protected void recomputeBounds()
recomputeBounds
in class Node
public void requestBoundsUpdate()
This will request the geometry to recompute the bounds. If the geometry is found to be live during this process, it will not update, and thus the value used will be the last updated (ie from the previous frame it was processed).
protected void setLive(boolean state)
setLive
in class Node
state
- true if this should be marked as live nowprotected void setUpdateHandler(NodeUpdateHandler handler)
setUpdateHandler
in class SceneGraphObject
handler
- The instance to use as a handlerprotected void checkForCyclicChild(SceneGraphObject parent) throws CyclicSceneGraphStructureException
checkForCyclicChild
in class SceneGraphObject
parent
- The reference to check against this class
CyclicSceneGraphStructureException
- Equal parent and childpublic void render(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
render
in interface RenderableObject
gl
- The gl context to draw withglu
- The utility context to draw withpublic void postRender(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
postRender
in interface RenderableObject
public void setPickMask(int state)
setPickMask
in interface PickableObject
state
- A bit mask of available options to pick forpublic int getPickMask()
getPickMask
in interface PickableObject
public void pickBatch(PickRequest[] reqs, int numRequests) throws NotPickableException, InvalidPickTimingException
pickBatch
in interface PickableObject
reqs
- The list of picks to be made, starting at this objectnumRequests
- The number of valid pick requests to process
NotPickableException
- This object has been marked as non pickable,
but you decided to try to call the method anyway
InvalidPickTimingException
- An attempt was made to pick outside
of the ApplicationUpdateObserver callback methodpublic void pickSingle(PickRequest req) throws NotPickableException, InvalidPickTimingException
pickSingle
in interface PickableObject
req
- The details of the pick to be made
NotPickableException
- This object has been marked as non pickable,
but you decided to try to call the method anyway
InvalidPickTimingException
- An attempt was made to pick outside
of the ApplicationUpdateObserver callback methodpublic boolean isVisible()
public Geometry getGeometry()
public void setGeometry(Geometry newGeom) throws InvalidWriteTimingException
newGeom
- The geometry
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic Appearance getAppearance()
public void setAppearance(Appearance newApp) throws InvalidWriteTimingException
newApp
- The appearance
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback method
|
Aviatrix3D 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |