|
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.NodeComponent
org.j3d.aviatrix3d.Raster
public abstract class Raster
Raster is an abstract class that specifies 2D pixel data required by a Pixmap node.
Raster may take one of two forms: Single byte bitmaps and multibyte images. When doing line intersections, rasters will only return true if the start point is within the bounds of the raster and the direction is along the -Z axis.
Coordinate System
Rasters use OpenGL's coordinate system that defines the position as the lower left corner of the object. Width extends to the right, height is upwards. Rasters are always rendered in screen space coordinates - 2D integer pixel locations. Fractional values don't exist.Note that OpenGL treats raster objects differently to polygonal data. If the origin is outside of the current clip bounds, the entire object is not shown on screen, even if part of its bounds lie inside the current viewport.
Internationalisation Resource Names
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_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 |
Constructor Summary | |
---|---|
Raster()
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. |
boolean |
checkPickMask(int mask)
Check the given pick mask against the node's internal pick mask representation. |
BoundingVolume |
getBounds()
Get the currently set bounds for this object. |
BoundingVolume |
getPickableBounds()
Get the bounds of this picking target so that testing can be performed on the object. |
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. |
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, numParents, removeParent |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
checkForCyclicChild, checkForCyclicParent, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, 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.rendering.GeometryRenderable |
---|
render |
Methods inherited from interface org.j3d.aviatrix3d.rendering.Renderable |
---|
equals |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
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 Raster()
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 methodpublic final int getPickTargetType()
getPickTargetType
in interface PickTarget
public boolean pickLineSegment(float[] start, float[] end, boolean findAny, float[] dataOut, int dataOutFlags) throws NotPickableException
pickLineSegment
in interface LeafPickTarget
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 anywaypublic boolean pickLineRay(float[] origin, float[] direction, boolean findAny, float[] dataOut, int dataOutFlags) throws NotPickableException
pickLineRay
in interface LeafPickTarget
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 anywaypublic boolean checkPickMask(int mask)
checkPickMask
in interface PickTarget
mask
- The bit mask to check against
public BoundingVolume getPickableBounds()
getPickableBounds
in interface PickTarget
protected abstract void recomputeBounds()
protected void updateBounds()
protected void markBoundsDirty()
protected boolean isVisible()
public boolean hasTransparency()
hasTransparency
in interface GeometryRenderable
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()
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |