|
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.NodeComponent
org.j3d.aviatrix3d.Geometry
Geometry is an abstract class that specifies the geometry component information required by a Shape3D node.
Geometry may take several forms. Vertex geometry like Triangle Arrays are not the only form of shape information that is usable in the OpenGL rendering pipeline. This represents the basic information that is common to all geometry.
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 static BoundingVoid |
INVALID_BOUNDS
Sharable version of the null bounds object for those that need it |
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 int |
pickFlags
Flag indicating if this object is pickable currently |
protected boolean |
validAlpha
Flag indicating current object has alpha values actually set |
Fields inherited from class org.j3d.aviatrix3d.NodeComponent |
lastParent, liveCount |
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 | |
Geometry()
The default constructor initialised the base values. |
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. |
int |
getPickMask()
Get the current pickable state mask of this object. |
boolean |
hasTransparency()
Check to see if this geometry has anything that could be interpreted as an alpha value. |
protected boolean |
isVisible()
Check to see if this geometry is making the geometry visible or not. |
protected 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 |
setPickMask(int state)
Set the node as being pickable currently using the given bit mask. |
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.NodeComponent |
addParent, getParents, hasChanged, numParents, removeParent |
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 |
Methods inherited from interface org.j3d.aviatrix3d.RenderableObject |
postRender, render |
Field Detail |
protected static final BoundingVoid INVALID_BOUNDS
protected Node[] parentList
protected int lastParentList
protected InternalNodeUpdateListener internalUpdater
protected BoundingVolume bounds
protected boolean implicitBounds
protected int pickFlags
protected boolean validAlpha
Constructor Detail |
public Geometry()
By default the values are:
implicitBounds: true;
pickable: true;
validAlpha: false
Method Detail |
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 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 methodprotected abstract void recomputeBounds()
protected void updateBounds()
protected void markBoundsDirty()
protected boolean isVisible()
public boolean hasTransparency()
public void boundsChanged(NodeUpdateListener l) throws InvalidListenerSetTimingException
l
- The change requestor
InvalidListenerSetTimingException
- If called when the node is not live or
if called during one of the bounds/data changed callbackspublic 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()
public 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
|
Aviatrix3D 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |