j3d.org Aviatrix3D

org.j3d.aviatrix3d
Class PickRequest

java.lang.Object
  extended byorg.j3d.aviatrix3d.PickRequest

public class PickRequest
extends java.lang.Object

Class for passing the detailed rendering information through the pipeline.

Version:
$Revision: 1.4 $
Author:
Justin Couch

Field Summary
 float additionalData
          When the geometry type is a cone, This is the spread angle in radians.
 float[] destination
          The ending location or the direction vector, depending on the geometry type requested.
 java.lang.Object foundPaths
          The picked data is placed here.
 boolean generateVWorldMatrix
          If this flag is set to true, generate the local to virtual world matrix for the picked result.
 float[] origin
          The starting location of the picking request
static int PICK_BOX
           
static int PICK_CONE
           
static int PICK_CONE_SEGMENT
           
static int PICK_CYLINDER
           
static int PICK_CYLINDER_SEGMENT
           
static int PICK_FRUSTUM
          Pick the geometry that is in the given view frustum.
static int PICK_LINE_SEGMENT
          Pick using a segment of a line.
static int PICK_POINT
          Pick using a point location.
static int PICK_RAY
          Pick using a ray location.
 int pickCount
          The number of valid picks that were found in this request.
 int pickGeometryType
          What type of geometry intersection testing should be performed?
 int pickSortType
          How the return data be sorted.
static int SORT_ALL
           
static int SORT_ANY
           
static int SORT_CLOSEST
           
static int SORT_ORDERED
           
 boolean useGeometry
          When the picking geometry is line or segment based, should the pick action be against the bounds or the actual geometry?
 
Constructor Summary
PickRequest()
          Create a new instance of this class with all values set to their defaults.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PICK_POINT

public static final int PICK_POINT
Pick using a point location. The only sort types that are valid are ANY or ALL. ORDERED and CLOSEST are treated as ALL and ANY respectively. Only the origin variable is used as input and it describes the point's location in world space.

See Also:
Constant Field Values

PICK_RAY

public static final int PICK_RAY
Pick using a ray location. All sort types that are valid and are calculated relative to the origin. The ray uses the origin variable as the start point and destination is the direction vector.

See Also:
Constant Field Values

PICK_LINE_SEGMENT

public static final int PICK_LINE_SEGMENT
Pick using a segment of a line. All sort types that are valid and are calculated relative to the origin. The segments uses the origin variable as the start point and destination is the end point.

See Also:
Constant Field Values

PICK_CYLINDER

public static final int PICK_CYLINDER
See Also:
Constant Field Values

PICK_CYLINDER_SEGMENT

public static final int PICK_CYLINDER_SEGMENT
See Also:
Constant Field Values

PICK_CONE

public static final int PICK_CONE
See Also:
Constant Field Values

PICK_CONE_SEGMENT

public static final int PICK_CONE_SEGMENT
See Also:
Constant Field Values

PICK_BOX

public static final int PICK_BOX
See Also:
Constant Field Values

PICK_FRUSTUM

public static final int PICK_FRUSTUM
Pick the geometry that is in the given view frustum. When using this pick type, the end user should re-allocate the origin variable to be 24 units in length and place the equations for the 6 bounding planes in the array in the order: right, left, bottom, top, near, far.

A positive pick is any bounding volume or geometry that is explicitly not completely out of the frustum. So long as part of the geometry falls within the frustum, it is considered a successful find.

See Also:
Constant Field Values

SORT_ALL

public static final int SORT_ALL
See Also:
Constant Field Values

SORT_ANY

public static final int SORT_ANY
See Also:
Constant Field Values

SORT_ORDERED

public static final int SORT_ORDERED
See Also:
Constant Field Values

SORT_CLOSEST

public static final int SORT_CLOSEST
See Also:
Constant Field Values

pickGeometryType

public int pickGeometryType
What type of geometry intersection testing should be performed?


useGeometry

public boolean useGeometry
When the picking geometry is line or segment based, should the pick action be against the bounds or the actual geometry?


pickSortType

public int pickSortType
How the return data be sorted. Must be one of the SORT_X types.


origin

public float[] origin
The starting location of the picking request


destination

public float[] destination
The ending location or the direction vector, depending on the geometry type requested.


additionalData

public float additionalData
When the geometry type is a cone, This is the spread angle in radians. When the geometry type is a cylinder, this is the radius of the cylinder. For any other pick type, this is ignored.


foundPaths

public java.lang.Object foundPaths
The picked data is placed here. The user may optionally provide the data here and the picking routines will update the values. If no data is provided, then the picking system will create a new instance for the user. For single picks (closest, any) then this object will be an instance of SceneGraphPath. For multiple picks (sorted, all) then this will be an ArrayList instance and will contain all of the scene graph paths that were found.


pickCount

public int pickCount
The number of valid picks that were found in this request.


generateVWorldMatrix

public boolean generateVWorldMatrix
If this flag is set to true, generate the local to virtual world matrix for the picked result. This flag is set to true by default.

Constructor Detail

PickRequest

public PickRequest()
Create a new instance of this class with all values set to their defaults. No pick geometry type or sort type is specified.


j3d.org Aviatrix3D

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