Aviatrix3D
2.1.0

org.j3d.aviatrix3d.picking
Interface PickableObject

All Known Implementing Classes:
Axis, Billboard, BitmapRaster, Box, BufferGeometry, ByteRaster, Cone, Cylinder, Geometry, Group, Group2D, ImageRaster, IndexedBufferGeometry, IndexedLineArray, IndexedLineArray, IndexedLineStripArray, IndexedLineStripArray, IndexedQuadArray, IndexedQuadArray, IndexedQuadStripArray, IndexedQuadStripArray, IndexedTriangleArray, IndexedTriangleArray, IndexedTriangleFanArray, IndexedTriangleFanArray, IndexedTriangleStripArray, IndexedTriangleStripArray, IndexedVertexGeometry, LineArray, LineArray, LineStripArray, LineStripArray, LODGroup, MaskedSwitch, PixelTransform, Pixmap, PointArray, PointArray, QuadArray, QuadArray, QuadStripArray, QuadStripArray, Raster, Shape3D, SharedGroup, SharedGroup2D, SharedNode, SharedNode2D, SortedPointArray, Sphere, Spring, SwitchGroup, Teapot, Text2D, Torus, TransformGroup, TriangleArray, TriangleArray, TriangleFanArray, TriangleFanArray, TriangleStripArray, TriangleStripArray, VertexGeometry

public interface PickableObject

A marker interface that indicates the object that implements is capable of supporting pick intersection requests.

The end user can call these objects requesting a pick be made using the given request object. From that request, processing will be performed and the found objects are returned as part of the picking request.

Pick intersection tests allows the classification of various picking types through the use of bit masks. The masks are bitwise-OR'd together to form the set of pickable capabilities. A number of pre-defined pick masks are provided in the PickRequest class. Since the OR operation is used, there are a total of 32 different "types" of pickable objects that could be defined by the system.

Version:
$Revision: 1.2 $
Author:
Justin Couch

Field Summary
static int COLLIDABLE_OBJECT
          Define the picking as being collidable.
static int GENERAL_OBJECT
          Find any general pickable node type.
static int PROXIMITY_OBJECT
          Define the picking as being an object that is near something.
static int VISIBLE_OBJECT
          Define the picking as being an object that is visible.
 
Method Summary
 int getPickMask()
          Get the current pickable state mask of this object.
 void pickBatch(PickRequest[] req, 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 setPickMask(int state)
          Set the node as being pickable currently using the given bit mask.
 

Field Detail

GENERAL_OBJECT

static final int GENERAL_OBJECT
Find any general pickable node type. THis is the generic catch-all picking mask that would be used in the majority of scene graphs. This has a value of 0x1.

See Also:
Constant Field Values

COLLIDABLE_OBJECT

static final int COLLIDABLE_OBJECT
Define the picking as being collidable. Collidable is useful for doing stuff like terrain following. This flag has a value of 0x2.

See Also:
Constant Field Values

VISIBLE_OBJECT

static final int VISIBLE_OBJECT
Define the picking as being an object that is visible. Typically this will be combined with the Frustum pick type. This flag has a value of 0x4.

See Also:
Constant Field Values

PROXIMITY_OBJECT

static final int PROXIMITY_OBJECT
Define the picking as being an object that is near something. Typically this will be used for implementing a user-defined proximity sensor for triggering different types of behaviours, LODs etc. This flag has a value of 0x8.

See Also:
Constant Field Values
Method Detail

setPickMask

void setPickMask(int state)
Set the node as being pickable currently using the given bit mask. A mask of 0 will completely disable picking.

Parameters:
state - A bit mask of available options to pick for

getPickMask

int getPickMask()
Get the current pickable state mask of this object. A value of zero means it is completely unpickable.

Returns:
A bit mask of available options to pick for

pickBatch

void pickBatch(PickRequest[] req,
               int numRequests)
               throws NotPickableException,
                      InvalidPickTimingException
Check for all intersections against this geometry and it's children to see if there is an intersection with the given set of requests.

Parameters:
req - The list of picks to be made, starting at this object
numRequests - The number of valid pick requests to process
Throws:
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

pickSingle

void pickSingle(PickRequest req)
                throws NotPickableException,
                       InvalidPickTimingException
Check for all intersections against this geometry and it's children to see if there is an intersection with the given set of requests.

Parameters:
req - The details of the pick to be made
Throws:
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
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org