|
Aviatrix3D 2.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
public class Shape3D
A Shape3D class wraps polygonal geometry and appearance information. into a single visual chunk.
By default, all shapes are pickable.
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.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 |
| Fields inherited from interface org.j3d.aviatrix3d.rendering.LeafCullable |
|---|
AUDIO_CULLABLE, CLIP_CULLABLE, FOG_CULLABLE, GEOMETRY_CULLABLE, LIGHT_CULLABLE, OVERRIDE_CULLABLE |
| 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. |
AppearanceRenderable |
getAppearanceRenderable()
Fetch the renderable that represents the visual appearance modifiers of this shape. |
void |
getCenter(float[] center)
Get the centre of the shape object. |
int |
getCullableType()
Get the type that this cullable represents. |
Geometry |
getGeometry()
Get the current geometry associated with this shape. |
GeometryRenderable |
getGeometryRenderable()
Fetch the renderable that represents the geometry of 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()
Get the child renderable of this object. |
boolean |
is2D()
Check to see whether this shape is something that represents 2D or 3D geometry. |
boolean |
isVisible()
State check to see whether the shape in it's current setup is visible. |
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, markBoundsDirty, removeParent, setBounds, setParent, updateParentBounds |
| Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
|---|
dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setUserData |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.j3d.aviatrix3d.rendering.LeafCullable |
|---|
getBounds |
| Constructor Detail |
|---|
public Shape3D()
| Method Detail |
|---|
public int getCullableType()
getCullableType in interface LeafCullablepublic Renderable getRenderable()
getRenderable in interface LeafCullablepublic boolean isVisible()
isVisible in interface ShapeRenderablepublic boolean is2D()
EffectRenderable, while 3D is. Note that this can be changed
depending on the type of geometry itself. A Shape3D node with an
IndexedLineArray that only has 2D coordinates is as much a 2D geometry
as a raster object.
is2D in interface ShapeRenderablepublic void getCenter(float[] center)
getCenter in interface ShapeRenderablecenter - The object to copy the center coordinates in topublic GeometryRenderable getGeometryRenderable()
getGeometryRenderable in interface ShapeRenderablepublic AppearanceRenderable getAppearanceRenderable()
getAppearanceRenderable in interface ShapeRenderablepublic void render(javax.media.opengl.GL gl)
render in interface ObjectRenderablegl - The gl context to draw withpublic void postRender(javax.media.opengl.GL gl)
postRender in interface ObjectRenderableprotected void updateBounds()
updateBounds in class Nodeprotected void recomputeBounds()
recomputeBounds in class Nodepublic 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).
requestBoundsUpdate in class Nodeprotected void setLive(boolean state)
setLive in class SceneGraphObjectstate - true if this should be marked as live nowprotected void setUpdateHandler(NodeUpdateHandler handler)
setUpdateHandler in class SceneGraphObjecthandler - The instance to use as a handler
protected void checkForCyclicChild(SceneGraphObject parent)
throws CyclicSceneGraphStructureException
checkForCyclicChild in class SceneGraphObjectparent - The reference to check against this class
CyclicSceneGraphStructureException - Equal parent and childpublic void setPickMask(int state)
setPickMask in interface PickableObjectstate - 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 PickableObjectreqs - 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 method
public void pickSingle(PickRequest req)
throws NotPickableException,
InvalidPickTimingException
pickSingle in interface PickableObjectreq - 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 SinglePickTargetpublic final int getPickTargetType()
getPickTargetType in interface PickTargetpublic boolean checkPickMask(int mask)
checkPickMask in interface PickTargetmask - 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.Comparableo - 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 Renderableequals in class java.lang.Objecto - The object to be compared
public Geometry getGeometry()
public void setGeometry(Geometry newGeom)
throws InvalidWriteTimingException
newGeom - The geometry
InvalidWriteTimingException - An attempt was made to write outside
of the NodeUpdateListener bounds changed 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 data changed 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.1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||