This page describes the proposed picking changes in Java 3D 1.4. The
main motivation is to improve picking performance. It eliminates the
need to rely on the picking utility for extra pick information, such as
the
color, normal and texture coordinates of the intersection points. This
information will be returned, by the new core picking APIs, in a newly
created PickInfo class.
The proposed API are :
Where
SCENEGRAPHPATH
- request for computed SceneGraphPath.
NODE
- request
for computed intersected Node.
LOCAL_TO_VWORLD
- request for computed local to virtual world transform.
CLOSEST_INTERSECTION_POINT -
request for
closest intersection point.
CLOSEST_DISTANCE
-
request for the closest distance of the intersection.
CLOSEST_GEOM_INFO
- request for only the closest intersection geometry
information.
ALL_GEOM_INFO
- request for all intersection geometry information.
CLOSEST_INTERSECTION_POINT
is not set, PickInfo.closestIntersectionPoint is set to null.CLOSEST_GEOM_INFO
is
set, PickInfo.intersectionInfos is of length 1, and
PickInfo.intersectionInfos[0]
contains the
information of the closest pick.ALL_GEOM_INFO
is set, PickInfo.intersectionInfos
contains all intersections of the
pickable node
in sorted order.CLOSEST_GEOM_INFO
and
ALL_GEOM_INFO
are not set, PickInfo.intersectionInfos is
set to null.CLOSEST_GEOM_INFO
and
ALL_GEOM_INFO
are set./**
Retrieves
the reference to the SceneGraphPath in this PickInfo object. */
method: public
SceneGraphPath getSceneGraphPath()
/**
Retrieves
the reference to the picked node, either a Shape3D or a Morph, in
this PickInfo object. */
method: public Node
getNode()
/** Retrieves
the reference to the LocalToVworld transform of the picked node in
this PickInfo object. */
method: public
Transform3D getLocalToVWorld()
/**
Retrieves
the reference to the closest intersection point in this PickInfo
object. */
method: public
Point3d getClosestIntersectionPoint()
/**
Retrieves
the distance between the start point of the pickShape and the
closest intersection point. */
method: public
double getClosestDistance()
/**
Retrieves
the reference to the array of intersection results in this PickInfo
object. */
method: public
IntersectionInfo[] getIntersectionInfos()
public class
PickInfo.IntersectionInfo
extends Object ( inner
class )
Page last updated — $Date$