|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.j3d.PickInfo
public class 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.
Locale
,
BranchGroup
Nested Class Summary | |
---|---|
class |
PickInfo.IntersectionInfo
The IntersectionInfo object holds extra information about an intersection of a PickShape with a Node as part of a PickInfo. |
Field Summary | |
---|---|
static int |
ALL_GEOM_INFO
Specifies that this PickInfo returns all the closest intersection geometry informations. |
static int |
CLOSEST_DISTANCE
Specifies that this PickInfo returns the closest intersection distance. |
static int |
CLOSEST_GEOM_INFO
Specifies that this PickInfo returns only the closest intersection geometry information. |
static int |
CLOSEST_INTERSECTION_POINT
Specifies that this PickInfo returns the closest intersection point. |
private double |
closestDistance
|
private Point3d |
closestIntersectionPoint
|
private PickInfo.IntersectionInfo[] |
intersectionInfoArr
|
private java.util.ArrayList |
intersectionInfoList
|
private boolean |
intersectionInfoListSorted
|
private Transform3D |
l2vw
|
private Transform3D |
l2vwRef
|
static int |
LOCAL_TO_VWORLD
Specifies that this PickInfo returns the computed local to vworld transform. |
private Node |
node
|
static int |
NODE
Specifies that this PickInfo returns the computed intersected Node object. |
private Node |
nodeRef
|
(package private) static int |
PICK_ALL
|
(package private) static int |
PICK_ANY
|
static int |
PICK_BOUNDS
Specifies a Pick using the bounds of the pickable nodes. |
static int |
PICK_GEOMETRY
Specifies a Pick using the geometry of the pickable nodes. |
static int |
SCENEGRAPHPATH
Specifies that this PickInfo returns the computed SceneGraphPath object. |
private SceneGraphPath |
sgp
|
Constructor Summary | |
---|---|
PickInfo()
PickInfo Constructor |
Method Summary | |
---|---|
(package private) PickInfo.IntersectionInfo |
createIntersectionInfo()
|
private static Node[] |
createPath(NodeRetained srcNode,
BranchGroupRetained bgRetained,
GeometryAtom geomAtom,
java.util.ArrayList initpath)
|
double |
getClosestDistance()
Retrieves the distance between the start point of the pickShape and the closest intersection point. |
Point3d |
getClosestIntersectionPoint()
Retrieves the reference to the closest intersection point in this PickInfo object. |
PickInfo.IntersectionInfo[] |
getIntersectionInfos()
Retrieves the reference to the array of intersection results in this PickInfo object. |
Transform3D |
getLocalToVWorld()
Retrieves the reference to the LocalToVworld transform of the picked node in this PickInfo object. |
(package private) Transform3D |
getLocalToVWorldRef()
|
Node |
getNode()
Retrieves the reference to the picked node, either a Shape3D or a Morph, in this PickInfo object. |
(package private) Node |
getNodeRef()
|
(package private) static java.util.ArrayList |
getPickInfos(java.util.ArrayList initpath,
BranchGroupRetained bgRetained,
GeometryAtom[] geomAtoms,
Locale locale,
int flags,
int pickType)
return all PickInfo[] of the geomAtoms. |
SceneGraphPath |
getSceneGraphPath()
Retrieves the reference to the SceneGraphPath in this PickInfo object. |
(package private) static java.util.ArrayList |
initSceneGraphPath(NodeRetained nodeR)
Search the path from nodeR up to Locale. |
(package private) void |
insertIntersectionInfo(PickInfo.IntersectionInfo iInfo)
|
private static boolean |
inside(BranchGroupRetained[] bgArr,
BranchGroupRetained bg)
Return true if bg is inside cachedBG or bg is null |
private static Node[] |
mergePath(java.util.ArrayList p1,
java.util.ArrayList p2)
copy p1, (follow by) p2 into a new array, p2 can be null The path is then reverse before return. |
(package private) static PickInfo[] |
pick(java.lang.Object node,
GeometryAtom[] geomAtoms,
int mode,
int flags,
PickShape pickShape,
int pickType)
|
private static java.util.ArrayList |
retrievePath(NodeRetained startNode,
NodeRetained endNode,
HashKey key)
search the full path from the bottom of the scene graph - startNode, up to the Locale if endNode is null. |
(package private) void |
setClosestDistance(double cDist)
|
(package private) void |
setClosestIntersectionPoint(Point3d cIPt)
|
(package private) void |
setLocalToVWorld(Transform3D l2vw)
|
(package private) void |
setLocalToVWorldRef(Transform3D l2vwRef)
|
(package private) void |
setNode(Node node)
|
(package private) void |
setNodeRef(Node nodeRef)
|
(package private) void |
setSceneGraphPath(SceneGraphPath sgp)
|
(package private) static void |
sortGeomAtoms(GeometryAtom[] geomAtoms,
PickShape shape)
Sort the GeometryAtoms distance from shape in ascending order geomAtoms.length must be >= 1 |
(package private) void |
sortIntersectionInfoArray(PickInfo.IntersectionInfo[] iInfoArr)
|
(package private) static void |
sortPickInfoArray(PickInfo[] pickInfoArr)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final int PICK_ALL
static final int PICK_ANY
private SceneGraphPath sgp
private Node node
private Transform3D l2vw
private Point3d closestIntersectionPoint
private double closestDistance
private PickInfo.IntersectionInfo[] intersectionInfoArr
private java.util.ArrayList intersectionInfoList
private boolean intersectionInfoListSorted
private Transform3D l2vwRef
private Node nodeRef
public static final int PICK_BOUNDS
public static final int PICK_GEOMETRY
public static final int SCENEGRAPHPATH
public static final int NODE
public static final int LOCAL_TO_VWORLD
public static final int CLOSEST_INTERSECTION_POINT
public static final int CLOSEST_DISTANCE
public static final int CLOSEST_GEOM_INFO
public static final int ALL_GEOM_INFO
Constructor Detail |
---|
PickInfo()
Method Detail |
---|
void setSceneGraphPath(SceneGraphPath sgp)
void setNode(Node node)
void setLocalToVWorld(Transform3D l2vw)
void setClosestIntersectionPoint(Point3d cIPt)
void setClosestDistance(double cDist)
void setLocalToVWorldRef(Transform3D l2vwRef)
void setNodeRef(Node nodeRef)
PickInfo.IntersectionInfo createIntersectionInfo()
void insertIntersectionInfo(PickInfo.IntersectionInfo iInfo)
void sortIntersectionInfoArray(PickInfo.IntersectionInfo[] iInfoArr)
static void sortPickInfoArray(PickInfo[] pickInfoArr)
public SceneGraphPath getSceneGraphPath()
Locale
,
BranchGroup
public Node getNode()
Locale
,
BranchGroup
public Transform3D getLocalToVWorld()
Locale
,
BranchGroup
public Point3d getClosestIntersectionPoint()
Locale
,
BranchGroup
public double getClosestDistance()
Locale
,
BranchGroup
Transform3D getLocalToVWorldRef()
Node getNodeRef()
public PickInfo.IntersectionInfo[] getIntersectionInfos()
Locale
,
BranchGroup
static java.util.ArrayList initSceneGraphPath(NodeRetained nodeR)
private static Node[] createPath(NodeRetained srcNode, BranchGroupRetained bgRetained, GeometryAtom geomAtom, java.util.ArrayList initpath)
private static boolean inside(BranchGroupRetained[] bgArr, BranchGroupRetained bg)
private static java.util.ArrayList retrievePath(NodeRetained startNode, NodeRetained endNode, HashKey key)
private static Node[] mergePath(java.util.ArrayList p1, java.util.ArrayList p2)
static void sortGeomAtoms(GeometryAtom[] geomAtoms, PickShape shape)
static java.util.ArrayList getPickInfos(java.util.ArrayList initpath, BranchGroupRetained bgRetained, GeometryAtom[] geomAtoms, Locale locale, int flags, int pickType)
static PickInfo[] pick(java.lang.Object node, GeometryAtom[] geomAtoms, int mode, int flags, PickShape pickShape, int pickType)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |