Java Doc for PickTool.java in  » 6.0-JDK-Modules » java-3d » com » sun » j3d » utils » pickfast » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » java 3d » com.sun.j3d.utils.pickfast 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.j3d.utils.pickfast.PickTool

All known Subclasses:   com.sun.j3d.utils.pickfast.PickCanvas,
PickTool
public class PickTool (Code)
The base class for optimized picking operations. The picking methods will return a PickInfo object for each object picked, which can then be queried to obtain more detailed information about the specific objects that were picked.

The pick mode specifies the detail level of picking before the PickInfo is returned:

  • PickInfo.PICK_BOUNDS - Pick using the only bounds of the pickable nodes.
  • PickInfo.PICK_GEOMETRY will pick using the geometry of the pickable nodes. Geometry nodes in the scene must have the ALLOW_INTERSECT capability set for this mode.
  • The pick flags specifies the content of the PickInfo(s) returned by the pick methods. This is specified as one or more individual bits that are bitwise "OR"ed together to describe the PickInfo data. The flags include :

      PickInfo.SCENEGRAPHPATH - request for computed SceneGraphPath.
      PickInfo.NODE - request for computed intersected Node.
      PickInfo.LOCAL_TO_VWORLD - request for computed local to virtual world transform.
      PickInfo.CLOSEST_INTERSECTION_POINT - request for closest intersection point.
      PickInfo.CLOSEST_DISTANCE - request for the distance of closest intersection.
      PickInfo.CLOSEST_GEOM_INFO - request for only the closest intersection geometry information.
      PickInfo.ALL_GEOM_INFO - request for all intersection geometry information.

When using pickAllSorted or pickClosest methods, the picks will be sorted by the distance from the start point of the pick shape to the intersection point.
See Also:   Locale.pickClosest(intintjavax.media.j3d.PickShape)



Field Summary
final public static  intTYPE_BRANCH_GROUP
     Flag to pass to getNode(int) to return a BranchGroup node from the SceneGraphPath.
final public static  intTYPE_GROUP
     Flag to pass to getNode(int) to return a Group node from the SceneGraphPath.
final public static  intTYPE_LINK
     Flag to pass to getNode(int) to return a Link node from the SceneGraphPath.
final public static  intTYPE_MORPH
     Flag to pass to getNode(int) to return a Morph node from the SceneGraphPath.
final public static  intTYPE_PRIMITIVE
     Flag to pass to getNode(int) to return a Primitive node from the SceneGraphPath.
final public static  intTYPE_SHAPE3D
     Flag to pass to getNode(int) to return a Shape3D node from the SceneGraphPath.
final public static  intTYPE_SWITCH
     Flag to pass to getNode(int) to return a Switch node from the SceneGraphPath.
final public static  intTYPE_TRANSFORM_GROUP
     Flag to pass to getNode(int) to return a TransformGroup node from the SceneGraphPath.
 intflags
    
 intmode
    
 BranchGrouppickRootBG
    
 LocalepickRootL
    
 PickShapepickShape
    
 Point3dstart
     Used to store a reference point used in determining how "close" points are.
protected  booleanuserDefineShape
    

Constructor Summary
public  PickTool(BranchGroup b)
     Constructor with BranchGroup to be picked.
public  PickTool(Locale l)
     Constructor with the Locale to be picked.

Method Summary
public  BranchGroupgetBranchGroup()
     Returns the BranchGroup to be picked if the tool was initialized with a BranchGroup, null otherwise.
public  intgetFlags()
     Gets the PickInfo content flags.
public  LocalegetLocale()
     Returns the Locale to be picked if the tool was initialized with a Locale, null otherwise.
public  intgetMode()
     Gets the picking detail mode.
public  NodegetNode(PickInfo pickInfo, int type)
    
public  PickShapegetPickShape()
     Returns the PickShape for this object.
public  Point3dgetStartPosition()
     Returns the start postion used for distance measurement.
public  PickInfo[]pickAll()
     Selects all the nodes that intersect the PickShape. An array of PickInfo objects which will contain information about the picked instances.
public  PickInfo[]pickAllSorted()
     Select all the nodes that intersect the PickShape, returned sorted.
public  PickInfopickAny()
     Select one of the nodes that intersect the PickShape A PickInfo object which will contain information about the picked instance.
public  PickInfopickClosest()
     Select the closest node that intersects the PickShape.
public  voidsetFlags(int flags)
     Sets the PickInfo content flags.
public  voidsetMode(int mode)
     Sets the picking detail mode.
public  voidsetShape(PickShape ps, Point3d startPt)
    
public  voidsetShapeBounds(Bounds bounds, Point3d startPt)
    
public  voidsetShapeConeRay(Point3d start, Vector3d dir, double angle)
     Sets the pick shape to an infinite PickCone.
public  voidsetShapeConeSegment(Point3d start, Point3d end, double angle)
    
public  voidsetShapeCylinderRay(Point3d start, Vector3d dir, double radius)
     Sets the pick shape to an infinite PickCylinder.
public  voidsetShapeCylinderSegment(Point3d start, Point3d end, double radius)
    
public  voidsetShapeRay(Point3d start, Vector3d dir)
     Sets the pick shape to a PickRay.
public  voidsetShapeSegment(Point3d start, Point3d end)
     Sets the pick shape to a PickSegment.

Field Detail
TYPE_BRANCH_GROUP
final public static int TYPE_BRANCH_GROUP(Code)
Flag to pass to getNode(int) to return a BranchGroup node from the SceneGraphPath.



TYPE_GROUP
final public static int TYPE_GROUP(Code)
Flag to pass to getNode(int) to return a Group node from the SceneGraphPath.



TYPE_LINK
final public static int TYPE_LINK(Code)
Flag to pass to getNode(int) to return a Link node from the SceneGraphPath.



TYPE_MORPH
final public static int TYPE_MORPH(Code)
Flag to pass to getNode(int) to return a Morph node from the SceneGraphPath.



TYPE_PRIMITIVE
final public static int TYPE_PRIMITIVE(Code)
Flag to pass to getNode(int) to return a Primitive node from the SceneGraphPath.



TYPE_SHAPE3D
final public static int TYPE_SHAPE3D(Code)
Flag to pass to getNode(int) to return a Shape3D node from the SceneGraphPath.



TYPE_SWITCH
final public static int TYPE_SWITCH(Code)
Flag to pass to getNode(int) to return a Switch node from the SceneGraphPath.



TYPE_TRANSFORM_GROUP
final public static int TYPE_TRANSFORM_GROUP(Code)
Flag to pass to getNode(int) to return a TransformGroup node from the SceneGraphPath.



flags
int flags(Code)



mode
int mode(Code)



pickRootBG
BranchGroup pickRootBG(Code)
Used to store the BranchGroup used for picking



pickRootL
Locale pickRootL(Code)
Used to store the Locale used for picking



pickShape
PickShape pickShape(Code)



start
Point3d start(Code)
Used to store a reference point used in determining how "close" points are.



userDefineShape
protected boolean userDefineShape(Code)




Constructor Detail
PickTool
public PickTool(BranchGroup b)(Code)
Constructor with BranchGroup to be picked.



PickTool
public PickTool(Locale l)(Code)
Constructor with the Locale to be picked.




Method Detail
getBranchGroup
public BranchGroup getBranchGroup()(Code)
Returns the BranchGroup to be picked if the tool was initialized with a BranchGroup, null otherwise.



getFlags
public int getFlags()(Code)
Gets the PickInfo content flags.



getLocale
public Locale getLocale()(Code)
Returns the Locale to be picked if the tool was initialized with a Locale, null otherwise.



getMode
public int getMode()(Code)
Gets the picking detail mode.



getNode
public Node getNode(PickInfo pickInfo, int type)(Code)
Get the first node of a certain type up the SceneGraphPath
Parameters:
  type - the type of node we are interested in a Node object
exception:
  NullPointerException - if pickInfo does not contain aScenegraphpath or a picked node



getPickShape
public PickShape getPickShape()(Code)
Returns the PickShape for this object.



getStartPosition
public Point3d getStartPosition()(Code)
Returns the start postion used for distance measurement.



pickAll
public PickInfo[] pickAll()(Code)
Selects all the nodes that intersect the PickShape. An array of PickInfo objects which will contain information about the picked instances. null if nothing was picked.



pickAllSorted
public PickInfo[] pickAllSorted()(Code)
Select all the nodes that intersect the PickShape, returned sorted. The "closest" object will be returned first. See note above to see how "closest" is determined.

An array of PickInfo objects which will contain information about the picked instances. null if nothing was picked.




pickAny
public PickInfo pickAny()(Code)
Select one of the nodes that intersect the PickShape A PickInfo object which will contain information about the picked instance. null if nothing was picked.



pickClosest
public PickInfo pickClosest()(Code)
Select the closest node that intersects the PickShape. See note above to see how "closest" is determined.

A PickInfo object which will contain information about the picked instance. null if nothing was picked.




setFlags
public void setFlags(int flags)(Code)
Sets the PickInfo content flags. The default is PickInfo.NODE.
Parameters:
  flags - specified as one or more individual bits that are bitwise "OR"ed together :
    PickInfo.SCENEGRAPHPATH - request for computed SceneGraphPath.
    PickInfo.NODE - request for computed intersected Node.
    PickInfo.LOCAL_TO_VWORLD - request for computed local to virtual world transform.
    PickInfo.CLOSEST_INTERSECTION_POINT - request for closest intersection point.
    PickInfo.CLOSEST_DISTANCE - request for the distance of closest intersection.
    PickInfo.CLOSEST_GEOM_INFO - request for only the closest intersection geometry information.
    PickInfo.ALL_GEOM_INFO - request for all intersection geometry information.

exception:
  IllegalArgumentException - if any other bits besides the above are set.



setMode
public void setMode(int mode)(Code)
Sets the picking detail mode. The default is PickInfo.PICK_BOUNDS.
Parameters:
  mode - One of PickInfo.PICK_BOUNDS or PickInfo.PICK_GEOMETRY.
exception:
  IllegalArgumentException - if mode is not a legal value



setShape
public void setShape(PickShape ps, Point3d startPt)(Code)
Sets the pick shape to a user-provided PickShape object
Parameters:
  ps - The pick shape to pick against.
Parameters:
  startPt - The start point to use for distance calculations



setShapeBounds
public void setShapeBounds(Bounds bounds, Point3d startPt)(Code)
Sets the pick shape to use a user-provided Bounds object
Parameters:
  bounds - The bounds to pick against.
Parameters:
  startPt - The start point to use for distance calculations



setShapeConeRay
public void setShapeConeRay(Point3d start, Vector3d dir, double angle)(Code)
Sets the pick shape to an infinite PickCone.
Parameters:
  start - The start of axis of the cone
Parameters:
  dir - The direction of the axis of the cone
Parameters:
  angle - The angle of the cone



setShapeConeSegment
public void setShapeConeSegment(Point3d start, Point3d end, double angle)(Code)
Sets the pick shape to a capped PickCone
Parameters:
  start - The start of axis of the cone
Parameters:
  end - The end of the axis of the cone
Parameters:
  angle - The angle of the cone



setShapeCylinderRay
public void setShapeCylinderRay(Point3d start, Vector3d dir, double radius)(Code)
Sets the pick shape to an infinite PickCylinder.
Parameters:
  start - The start of axis of the cylinder
Parameters:
  dir - The direction of the axis of the cylinder
Parameters:
  radius - The radius of the cylinder



setShapeCylinderSegment
public void setShapeCylinderSegment(Point3d start, Point3d end, double radius)(Code)
Sets the pick shape to a capped PickCylinder
Parameters:
  start - The start of axis of the cylinder
Parameters:
  end - The end of the axis of the cylinder
Parameters:
  radius - The radius of the cylinder



setShapeRay
public void setShapeRay(Point3d start, Vector3d dir)(Code)
Sets the pick shape to a PickRay.
Parameters:
  start - The start of the ray
Parameters:
  dir - The direction of the ray



setShapeSegment
public void setShapeSegment(Point3d start, Point3d end)(Code)
Sets the pick shape to a PickSegment.
Parameters:
  start - The start of the segment
Parameters:
  end - The end of the segment



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.