| java.lang.Object javax.media.j3d.PickInfo
PickInfo | public class PickInfo extends Object (Code) | | 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.
See Also: Locale See Also: BranchGroup See Also: since: Java 3D 1.4 |
Inner Class :public class IntersectionInfo extends Object | |
Field Summary | |
final public static int | ALL_GEOM_INFO Specifies that this PickInfo returns all the closest intersection
geometry informations. | final public static int | CLOSEST_DISTANCE Specifies that this PickInfo returns the closest intersection distance. | final public static int | CLOSEST_GEOM_INFO Specifies that this PickInfo returns only the closest intersection
geometry information. | final public static int | CLOSEST_INTERSECTION_POINT Specifies that this PickInfo returns the closest intersection point. | final public static int | LOCAL_TO_VWORLD Specifies that this PickInfo returns the computed local to vworld transform. | final public static int | NODE Specifies that this PickInfo returns the computed intersected Node object. | final static int | PICK_ALL | final static int | PICK_ANY | final public static int | PICK_BOUNDS Specifies a Pick using the bounds of the pickable nodes. | final public static int | PICK_GEOMETRY Specifies a Pick using the geometry of the pickable nodes. | final public static int | SCENEGRAPHPATH Specifies that this PickInfo returns the computed SceneGraphPath object. |
Method Summary | |
IntersectionInfo | createIntersectionInfo() | public double | getClosestDistance() Retrieves the distance between the start point of the pickShape and the closest intersection point. | public Point3d | getClosestIntersectionPoint() Retrieves the reference to the closest intersection point in this PickInfo object. | public IntersectionInfo[] | getIntersectionInfos() Retrieves the reference to the array of intersection results in this PickInfo object. | public Transform3D | getLocalToVWorld() Retrieves the reference to the LocalToVworld transform of the picked node in this PickInfo object. | Transform3D | getLocalToVWorldRef() | public Node | getNode() Retrieves the reference to the picked node, either a Shape3D or a Morph, in this PickInfo object. | Node | getNodeRef() | static ArrayList | getPickInfos(ArrayList initpath, BranchGroupRetained bgRetained, GeometryAtom geomAtoms, Locale locale, int flags, int pickType) return all PickInfo[] of the geomAtoms. | public SceneGraphPath | getSceneGraphPath() Retrieves the reference to the SceneGraphPath in this PickInfo object. | static ArrayList | initSceneGraphPath(NodeRetained nodeR) Search the path from nodeR up to Locale. | void | insertIntersectionInfo(IntersectionInfo iInfo) | static PickInfo[] | pick(Object node, GeometryAtom[] geomAtoms, int mode, int flags, PickShape pickShape, int pickType) | void | setClosestDistance(double cDist) | void | setClosestIntersectionPoint(Point3d cIPt) | void | setLocalToVWorld(Transform3D l2vw) | void | setLocalToVWorldRef(Transform3D l2vwRef) | void | setNode(Node node) | void | setNodeRef(Node nodeRef) | void | setSceneGraphPath(SceneGraphPath sgp) | static void | sortGeomAtoms(GeometryAtom geomAtoms, PickShape shape) | void | sortIntersectionInfoArray(IntersectionInfo[] iInfoArr) | static void | sortPickInfoArray(PickInfo[] pickInfoArr) |
ALL_GEOM_INFO | final public static int ALL_GEOM_INFO(Code) | | Specifies that this PickInfo returns all the closest intersection
geometry informations.
|
CLOSEST_DISTANCE | final public static int CLOSEST_DISTANCE(Code) | | Specifies that this PickInfo returns the closest intersection distance.
|
CLOSEST_GEOM_INFO | final public static int CLOSEST_GEOM_INFO(Code) | | Specifies that this PickInfo returns only the closest intersection
geometry information.
|
CLOSEST_INTERSECTION_POINT | final public static int CLOSEST_INTERSECTION_POINT(Code) | | Specifies that this PickInfo returns the closest intersection point.
|
LOCAL_TO_VWORLD | final public static int LOCAL_TO_VWORLD(Code) | | Specifies that this PickInfo returns the computed local to vworld transform.
|
NODE | final public static int NODE(Code) | | Specifies that this PickInfo returns the computed intersected Node object.
|
PICK_ALL | final static int PICK_ALL(Code) | | |
PICK_ANY | final static int PICK_ANY(Code) | | |
PICK_BOUNDS | final public static int PICK_BOUNDS(Code) | | Specifies a Pick using the bounds of the pickable nodes.
|
PICK_GEOMETRY | final public static int PICK_GEOMETRY(Code) | | Specifies a Pick using the geometry of the pickable nodes.
|
SCENEGRAPHPATH | final public static int SCENEGRAPHPATH(Code) | | Specifies that this PickInfo returns the computed SceneGraphPath object.
|
PickInfo | PickInfo()(Code) | | PickInfo Constructor
|
createIntersectionInfo | IntersectionInfo createIntersectionInfo()(Code) | | |
getClosestDistance | public double getClosestDistance()(Code) | | Retrieves the distance between the start point of the pickShape and the closest intersection point.
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 returnvalue is the closest distance in double even if flag is not set with CLOSET_INTERSECTION_POINT. See Also: Locale See Also: BranchGroup |
getClosestIntersectionPoint | public Point3d getClosestIntersectionPoint()(Code) | | Retrieves the reference to the closest intersection point in this PickInfo object.
the closest intersection point, or null if flag is not set with CLOSEST_INTERSECTION_POINT. See Also: Locale See Also: BranchGroup |
getIntersectionInfos | public IntersectionInfo[] getIntersectionInfos()(Code) | | Retrieves the reference to the array of intersection results in this PickInfo object.
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: Locale See Also: BranchGroup |
getLocalToVWorld | public Transform3D getLocalToVWorld()(Code) | | Retrieves the reference to the LocalToVworld transform of the picked node in this PickInfo object.
the local to vworld transform, or null if flag is not set with LOCAL_TO_VWORLD. See Also: Locale See Also: BranchGroup |
getNode | public Node getNode()(Code) | | Retrieves the reference to the picked node, either a Shape3D or a Morph, in this PickInfo object.
the picked leaf node object, or null if flag is not set with NODE. See Also: Locale See Also: BranchGroup |
getPickInfos | static ArrayList getPickInfos(ArrayList initpath, BranchGroupRetained bgRetained, GeometryAtom geomAtoms, Locale locale, int flags, int pickType)(Code) | | return all PickInfo[] of the geomAtoms.
If initpath is null, the path is search from
geomAtom Shape3D/Morph Node up to Locale
(assume the same locale).
Otherwise, the path is search up to node or
null is return if it is not hit.
|
getSceneGraphPath | public SceneGraphPath getSceneGraphPath()(Code) | | Retrieves the reference to the SceneGraphPath in this PickInfo object.
the SceneGraphPath object, or null if flag is not set with SCENEGRAPHPATH. See Also: Locale See Also: BranchGroup |
initSceneGraphPath | static ArrayList initSceneGraphPath(NodeRetained nodeR)(Code) | | Search the path from nodeR up to Locale.
Return the search path as ArrayList if found.
Note that the locale will not insert into path.
|
insertIntersectionInfo | void insertIntersectionInfo(IntersectionInfo iInfo)(Code) | | |
setClosestDistance | void setClosestDistance(double cDist)(Code) | | |
setClosestIntersectionPoint | void setClosestIntersectionPoint(Point3d cIPt)(Code) | | |
sortGeomAtoms | static void sortGeomAtoms(GeometryAtom geomAtoms, PickShape shape)(Code) | | Sort the GeometryAtoms distance from shape in ascending order
geomAtoms.length must be >= 1
|
sortIntersectionInfoArray | void sortIntersectionInfoArray(IntersectionInfo[] iInfoArr)(Code) | | |
sortPickInfoArray | static void sortPickInfoArray(PickInfo[] pickInfoArr)(Code) | | |
|
|