public class PickInfo
extends java.lang.Object
Locale,
BranchGroup| Modifier and Type | Class and Description |
|---|---|
class |
PickInfo.IntersectionInfo
The IntersectionInfo object holds extra information about an intersection
of a PickShape with a Node as part of a PickInfo.
|
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
PickInfo()
PickInfo Constructor
|
| Modifier and Type | Method and Description |
|---|---|
(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) |
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
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,
BranchGrouppublic Node getNode()
Locale,
BranchGrouppublic Transform3D getLocalToVWorld()
Locale,
BranchGrouppublic Point3d getClosestIntersectionPoint()
Locale,
BranchGrouppublic double getClosestDistance()
Locale,
BranchGroupTransform3D getLocalToVWorldRef()
Node getNodeRef()
public PickInfo.IntersectionInfo[] getIntersectionInfos()
Locale,
BranchGroupstatic 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)
Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.