|
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.NodeComponent
org.j3d.aviatrix3d.Geometry
Geometry is an abstract class that specifies the geometry component information required by a Shape3D node.
Field Summary | |
protected BoundingVolume |
bounds
Bounding volume set by the user |
protected boolean |
implicitBounds
Was the bounds automatically calculated? |
protected InternalNodeUpdateListener |
internalUpdater
Update handler for the external code. |
protected int |
lastParentList
Index to the next place to add items in the nodeList |
protected Node[] |
parentList
Listing of all the parents of this node |
protected boolean |
pickable
Flag indicating if this object is pickable currently |
Fields inherited from class org.j3d.aviatrix3d.NodeComponent |
liveCount |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
alive, updateHandler, WRITE_TIMING_MSG |
Constructor Summary | |
Geometry()
The default constructor. |
Method Summary | |
protected void |
addParent(Node p)
Add a parent to this node. |
void |
boundsChanged(NodeUpdateListener l)
Notify the node that you have updates to the node that might alter its bounds. |
BoundingVolume |
getBounds()
Get the currently set bounds for this object. |
boolean |
isPickable()
Get the current pickable state of this object |
protected abstract void |
markBoundsDirty()
Mark this node as having dirty bounds due to it's geometry having changed. |
void |
pickBatch(PickRequest[] reqs,
int numRequests)
Check for all intersections against this geometry to see if there is an intersection with the given set of requests. |
boolean |
pickLineRay(float[] origin,
float[] direction,
boolean findAny,
float[] dataOut,
int dataOutFlags)
Check for all intersections against this geometry using a line ray and return the exact distance away of the closest picking point. |
boolean |
pickLineSegment(float[] start,
float[] end,
boolean findAny,
float[] dataOut,
int dataOutFlags)
Check for all intersections against this geometry using a line segment and return the exact distance away of the closest picking point. |
void |
pickSingle(PickRequest req)
Check for all intersections against this geometry to see if there is an intersection with the given set of requests. |
protected abstract void |
recomputeBounds()
Internal method to recalculate the implicit bounds of this Node. |
protected void |
removeParent(Node p)
Remove a parent from this shared group. |
void |
setBounds(BoundingVolume b)
Set the bounds to the given explicit value. |
void |
setPickable(boolean state)
Set the node as being pickable currently. |
protected abstract void |
updateBounds()
Update this node's bounds and then call the parent to update it's bounds. |
Methods inherited from class org.j3d.aviatrix3d.NodeComponent |
addParent, getParents, hasChanged, numParents, removeParent, renderState, restoreState |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
checkForCyclicChild, checkForCyclicParent, dataChanged, getUserData, isLive, setLive, setUpdateHandler, setUserData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Node[] parentList
protected int lastParentList
protected InternalNodeUpdateListener internalUpdater
protected BoundingVolume bounds
protected boolean implicitBounds
protected boolean pickable
Constructor Detail |
public Geometry()
Method Detail |
protected abstract void updateBounds()
protected abstract void recomputeBounds()
protected abstract void markBoundsDirty()
public void boundsChanged(NodeUpdateListener l)
l
- The change requestorpublic void setBounds(BoundingVolume b) throws InvalidWriteTimingException
b
- The new bounds to use or null to clear
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic BoundingVolume getBounds()
protected void addParent(Node p) throws AlreadyParentedException, InvalidNodeTypeException
p
- The new parent instance to add to the list
AlreadyParentedException
- There is a valid parent already set
InvalidNodeTypeException
- Not a group nodeprotected void removeParent(Node p)
p
- The new parent instance to remove from the listpublic void setPickable(boolean state)
setPickable
in interface PickableObject
state
- true to make this node pickablepublic boolean isPickable()
isPickable
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 pickLineSegment(float[] start, float[] end, boolean findAny, float[] dataOut, int dataOutFlags) throws NotPickableException, InvalidPickTimingException
start
- The start point of the segmentend
- The end point of the segmentfindAny
- True if it only has to find a single intersection and can
exit as soon as it finds the first intersection. False if it must find
the closest polygondataOut
- An array to put the data in for the intersection. Exact
format is described by the flagsdataOutFlags
- A set of derived-class specific flags describing what
data should be included in the output array
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 pickLineRay(float[] origin, float[] direction, boolean findAny, float[] dataOut, int dataOutFlags) throws NotPickableException, InvalidPickTimingException
origin
- The start point of the raydirection
- The direction vector of the rayfindAny
- True if it only has to find a single intersection and can
exit as soon as it finds the first intersection. False if it must find
the closest polygondataOut
- An array to put the data in for the intersection. Exact
format is described by the flagsdataOutFlags
- A set of derived-class specific flags describing what
data should be included in the output array
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
|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |