Package javax.media.j3d
Class PickInfo
java.lang.Object
javax.media.j3d.PickInfo
The PickInfo object contains the computed information about a pick hit.
The detailed information about each intersection of the PickShape
with the picked Node can be inquired. The PickInfo object is constructed with
basic information and more detailed information can be generated by setting the
appropriate mask to the flag argument in the pick methods of BranchGroup and
Locale.
- Since:
- Java 3D 1.4
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
The IntersectionInfo object holds extra information about an intersection of a PickShape with a Node as part of a PickInfo. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Specifies that this PickInfo returns all the closest intersection geometry informations.static final int
Specifies that this PickInfo returns the closest intersection distance.static final int
Specifies that this PickInfo returns only the closest intersection geometry information.static final int
Specifies that this PickInfo returns the closest intersection point.static final int
Specifies that this PickInfo returns the computed local to vworld transform.static final int
Specifies that this PickInfo returns the computed intersected Node object.static final int
Specifies a Pick using the bounds of the pickable nodes.static final int
Specifies a Pick using the geometry of the pickable nodes.static final int
Specifies that this PickInfo returns the computed SceneGraphPath object. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Retrieves the distance between the start point of the pickShape and the closest intersection point.javax.vecmath.Point3d
Retrieves the reference to the closest intersection point in this PickInfo object.Retrieves the reference to the array of intersection results in this PickInfo object.Retrieves the reference to the LocalToVworld transform of the picked node in this PickInfo object.getNode()
Retrieves the reference to the picked node, either a Shape3D or a Morph, in this PickInfo object.Retrieves the reference to the SceneGraphPath in this PickInfo object.
-
Field Details
-
PICK_BOUNDS
public static final int PICK_BOUNDSSpecifies a Pick using the bounds of the pickable nodes.- See Also:
-
PICK_GEOMETRY
public static final int PICK_GEOMETRYSpecifies a Pick using the geometry of the pickable nodes.- See Also:
-
SCENEGRAPHPATH
public static final int SCENEGRAPHPATHSpecifies that this PickInfo returns the computed SceneGraphPath object.- See Also:
-
NODE
public static final int NODESpecifies that this PickInfo returns the computed intersected Node object.- See Also:
-
LOCAL_TO_VWORLD
public static final int LOCAL_TO_VWORLDSpecifies that this PickInfo returns the computed local to vworld transform.- See Also:
-
CLOSEST_INTERSECTION_POINT
public static final int CLOSEST_INTERSECTION_POINTSpecifies that this PickInfo returns the closest intersection point.- See Also:
-
CLOSEST_DISTANCE
public static final int CLOSEST_DISTANCESpecifies that this PickInfo returns the closest intersection distance.- See Also:
-
CLOSEST_GEOM_INFO
public static final int CLOSEST_GEOM_INFOSpecifies that this PickInfo returns only the closest intersection geometry information.- See Also:
-
ALL_GEOM_INFO
public static final int ALL_GEOM_INFOSpecifies that this PickInfo returns all the closest intersection geometry informations.- See Also:
-
-
Method Details
-
getSceneGraphPath
Retrieves the reference to the SceneGraphPath in this PickInfo object.- Returns:
- the SceneGraphPath object, or null if flag is not set with SCENEGRAPHPATH.
- See Also:
-
getNode
Retrieves the reference to the picked node, either a Shape3D or a Morph, in this PickInfo object.- Returns:
- the picked leaf node object, or null if flag is not set with NODE.
- See Also:
-
getLocalToVWorld
Retrieves the reference to the LocalToVworld transform of the picked node in this PickInfo object.- Returns:
- the local to vworld transform, or null if flag is not set with LOCAL_TO_VWORLD.
- See Also:
-
getClosestIntersectionPoint
public javax.vecmath.Point3d getClosestIntersectionPoint()Retrieves the reference to the closest intersection point in this PickInfo object.- Returns:
- the closest intersection point, or null if flag is not set with CLOSEST_INTERSECTION_POINT.
- See Also:
-
getClosestDistance
public double getClosestDistance()Retrieves the distance between the start point of the pickShape and the closest intersection point.- Returns:
- the closest distance in double, or NaN if flag is not set with CLOSEST_INTERSECTION_POINT. Note : If this PickInfo object is returned by either pickClosest or pickAllSorted method, the return value is the closest distance in double even if flag is not set with CLOSET_INTERSECTION_POINT.
- See Also:
-
getIntersectionInfos
Retrieves the reference to the array of intersection results in this PickInfo object.- Returns:
- an array of 1 IntersectionInfo object if flag is to set CLOSEST_GEOM_INFO, or an array of N IntersectionInfo objects containing all intersections of the picked node in sorted order if flag is to set ALL_GEOM_INFO, or null if neither bit is set.
- See Also:
-