|
Aviatrix3D 2.0 Dev |
||||||||||
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.picking.PickableObject |
COLLIDABLE_OBJECT, GENERAL_OBJECT, PROXIMITY_OBJECT, VISIBLE_OBJECT |
Fields inherited from interface org.j3d.aviatrix3d.picking.PickTarget |
CUSTOM_PICK_TYPE, GROUP_PICK_TYPE, LEAF_PICK_TYPE, SINGLE_PICK_TYPE |
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. |
boolean |
checkPickMask(int mask)
Check the given pick mask against the node's internal pick mask representation. |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
int |
compareTo(Shape3D sh)
Compares this object with the specified object for order. |
boolean |
equals(java.lang.Object o)
Compare this object for equality to the given object. |
boolean |
equals(Shape3D sh)
Compares this object with the specified object to check for equivalence. |
Appearance |
getAppearance()
Get the current appearance associated with this shape. |
Geometry |
getGeometry()
Get the current geometry associated with this shape. |
BoundingVolume |
getPickableBounds()
Get the bounds of this picking target so that testing can be performed on the object. |
PickTarget |
getPickableChild()
Return the child that is pickable of from this target. |
int |
getPickMask()
Get the current pickable state mask of this object. |
int |
getPickTargetType()
Return the type constant that represents the type of pick target this is. |
Renderable |
getRenderable(int bufferId)
Get the Renderable instance needed to process this object for
the given buffer ID. |
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(javax.media.opengl.GL gl)
|
protected void |
recomputeBounds()
Internal method to recalculate the implicit bounds of this Node. |
void |
render(javax.media.opengl.GL gl)
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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Shape3D()
Method Detail |
public Renderable getRenderable(int bufferId)
Renderable
instance needed to process this object for
the given buffer ID.
getRenderable
in class Leaf
bufferId
- The ID of the buffer for the renderable to encapsulate
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(javax.media.opengl.GL gl)
render
in interface RenderableObject
gl
- The gl context to draw withpublic void postRender(javax.media.opengl.GL gl)
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 PickTarget getPickableChild()
getPickableChild
in interface SinglePickTarget
public final int getPickTargetType()
getPickTargetType
in interface PickTarget
public boolean checkPickMask(int mask)
checkPickMask
in interface PickTarget
mask
- The bit mask to check against
public BoundingVolume getPickableBounds()
getPickableBounds
in interface PickTarget
public int compareTo(java.lang.Object o) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
o
- The objec to be compared
java.lang.ClassCastException
- The specified object's type prevents it from
being compared to this Objectpublic boolean equals(java.lang.Object o)
equals
in interface Renderable
o
- The object to be compared
public 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 methodpublic int compareTo(Shape3D sh)
sh
- The argument instance to be compared
public boolean equals(Shape3D sh)
sh
- The shape instance to be compared
|
Aviatrix3D 2.0 Dev |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |