From eb30e2c6288928ab18c51a659a5cab18a38dfa4b Mon Sep 17 00:00:00 2001 From: Chien Yang Date: Fri, 1 Apr 2005 01:51:15 +0000 Subject: Update Proposed Picking API change. git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@187 ba19aa83-45c5-6ac9-afd3-db810772062c --- www/j3d1_4/picking.html | 190 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 175 insertions(+), 15 deletions(-) (limited to 'www/j3d1_4') diff --git a/www/j3d1_4/picking.html b/www/j3d1_4/picking.html index c7f9ee7..5dbfbf5 100644 --- a/www/j3d1_4/picking.html +++ b/www/j3d1_4/picking.html @@ -11,23 +11,183 @@ Picking Changes

ROUGH DRAFT: This API is a Work in Progress


-

This page describes proposed picking changes in Java 3D 1.4... +

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 picking utility for extra pick information, such as the +color, normal and texture coordinates of the intersection points. This +information will be returned, from the core picking methods, in a newly +created PickInfo class.
+  +
+The proposed API is:

-

The proposed API is:

- -

More info here... +

The following 4 methods will be +added to +Locale and BranchGroup :  +
+

+
public +PickInfo[] pickAll( +int mode, int flags, PickShape pickShape )
+public PickInfo[] +pickAllSorted( int mode, int flags, PickShape pickShape )
+public PickInfo pickClosest( +int mode, int flags, PickShape pickShape )
+public PickInfo pickAny( int +mode, int flags, PickShape pickShape )
+
+

+
+Where

-

Page last updated — +

mode +is an enum of [ Bounds, Geometry ]
+flags +is a mask indicating which components are present in each returned +PickInfo object. This is specified as one or more individual flags that +are bitwise "OR"ed together to describe the returned per PickInfo data. +
+The flags include:
+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.
+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.     + 
+
+

+

+
+NOTES :
+

+
If CLOSEST_INTERSECTION_POINT +is not set +return PickInfo.closestIntersectionPoint is set to null.
+If CLOSEST_GEOM_INFO is +set the return PickInfo.intersectionInfos is of length 1, and +pickInfo.geomPickInfo +contains the +information of the closest pick.
+If ALL_GEOM_INFO is set +the return PickInfo.intersectionInfos contains all intersections of the +pickable node +in sorted order.
+If both CLOSEST_GEOM_INFO +and +ALL_GEOM_INFO are not set, PickInfo.intersectionInfos is +set to null.
+An IllegalArgumentException +is thrown if  both CLOSEST_GEOM_INFO +and +ALL_GEOM_INFO are set.
+
+


+
+    * New classes

+public class PickInfo extends Object    +

+/** Retrieves +the reference to the SceneGraphPath in this PickInfo object. */
+public +SceneGraphPath getSceneGraphPath()
+

+

/** Retrieves +the reference to the picked node, either a Shape3D or a Morph, in +this PickInfo object. */
+
public Node getNode()
+

+/** Retrieves +the reference to the LocalToVworld transform of the picked node in +this PickInfo object. */

+
public +Transform3D getLocalToVWorld()
+

+

/** +Retrieves +the reference to the closest intersection point in this PickInfo +object. */
+
public +Point3d getClosestIntersectionPoint()
+

+

/** +Retrieves +the distance between the start point of the pickShape and the +intersection point. */
+
public +double getDistance()
+

+

/** +Retrieves +the reference to the array of intersection results in this PickInfo +object. */
+
public +IntersectionInfo[] getIntersectionInfos()
+

+

public class +PickInfo.IntersectionInfo extends Object  ( inner +class )
+

+
/** +Retrieves +the index to the intersected geometry in the picked node, either a +Shape3D or Morph. */
+public +int getGeometryIndex() 
+
+
/** Retrieves +the reference to the intersected geometry in the picked object, +either a Shape3D or Morph. */
+public +Geometry getGeometry()
+
+/** Retrieves +the interpolation weights for each of the verticies of the  +intersected primitive. */
+public +float[] getWeights()
+
+/** Retrieves +the reference to the intersection point of the picked geometry in this +IntersectionInfo object. */
+public +Point3d getIntersectionPoint()
+

+/** Retrieves +the vertex indices of the intersected primitive in the geometry. */
+public int[] getVertexIndices()
+
+

+

+

+

+


+Page last updated — $Date$

-- cgit v1.2.3