Java Doc for PickObject.java in  » 6.0-JDK-Modules » java-3d » com » sun » j3d » utils » behaviors » picking » 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.behaviors.picking 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.j3d.utils.behaviors.picking.PickObject

PickObject
public class PickObject extends Object (Code)

See Also:   com.sun.j3d.utils.picking.PickCanvas


Field Summary
final public static  intBRANCH_GROUP
     A flag to indicate to the pickNode method to return a BranchGroup node from a given SceneGraphPath.
final public static  intGROUP
     A flag to indicate to the pickNode method to return a Group node from a given SceneGraphPath.
final public static  intLINK
     A flag to indicate to the pickNode method to return a Link node from a given SceneGraphPath.
final public static  intMORPH
     A flag to indicate to the pickNode method to return a Morph node from a given SceneGraphPath.
final public static  intPRIMITIVE
     A flag to indicate to the pickNode method to return a Primitive node from a given SceneGraphPath.
final public static  intSHAPE3D
     A flag to indicate to the pickNode method to return a Shape3D node from a given SceneGraphPath.
final public static  intSWITCH
     A flag to indicate to the pickNode method to return a Switch node from a given SceneGraphPath.
final public static  intTRANSFORM_GROUP
     A flag to indicate to the pickNode method to return a TransformGroup node from a given SceneGraphPath.
final public static  intUSE_BOUNDS
     Set this flag if you want to pick by bounds.
final public static  intUSE_GEOMETRY
     Set this flag if you want to pick by geometry.
 Canvas3Dcanvas
    
final static  booleandebug
    
 Vector3ddirection
    
 Point3dorigin
    
 intpickBy
    
 PickRaypickRay
    
 BranchGrouppickRoot
    
 SceneGraphPathsceneGraphPath
    
 SceneGraphPathsceneGraphPathArr
    

Constructor Summary
public  PickObject(Canvas3D c, BranchGroup root)
     Creates a PickObject.
Parameters:
  c - Current J3D canvas.
Parameters:
  root - The portion of the scenegraph for which picking is to occuron.

Method Summary
public  PickShapegeneratePickRay(int xpos, int ypos)
     Creates a PickRay that starts at the viewer position and points into the scene in the direction of (xpos, ypos) specified in window space.
Parameters:
  xpos - The value along the x-axis.
Parameters:
  ypos - The value along the y-axis.
public  SceneGraphPath[]pickAll(int xpos, int ypos)
     Returns an array referencing all the items that are pickable below the BranchGroup (specified in the PickObject constructor) that intersect with a ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) specified in window space.
public  SceneGraphPath[]pickAll(int xpos, int ypos, int flag)
     Returns an array referencing all the items that are pickable below the BranchGroup (specified in the PickObject constructor) that intersect with a ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) specified in window space.
public  SceneGraphPath[]pickAllSorted(int xpos, int ypos)
     Returns a sorted array of references to all the Pickable items below the BranchGroup (specified in the PickObject constructor) that intersect with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space.
public  SceneGraphPath[]pickAllSorted(int xpos, int ypos, int flag)
     Returns a sorted array of references to all the Pickable items below the BranchGroup (specified in the PickObject constructor) that intersect with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space.
public  SceneGraphPathpickAny(int xpos, int ypos)
     Returns a reference to any item that is Pickable below the specified BranchGroup (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in window space.
Parameters:
  xpos - The value along the x-axis.
Parameters:
  ypos - The value along the y-axis.
public  SceneGraphPathpickAny(int xpos, int ypos, int flag)
     Returns a reference to any item that is Pickable below the specified BranchGroup (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in window space.
Parameters:
  xpos - The value along the x-axis.
Parameters:
  ypos - The value along the y-axis.
Parameters:
  flag - Specifys picking by Geometry or Bounds.
public  SceneGraphPathpickClosest(int xpos, int ypos)
     Returns a reference to the item that is closest to the viewer and is Pickable below the BranchGroup (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space.
Parameters:
  xpos - The value along the x-axis.
Parameters:
  ypos - The value along the y-axis.
public  SceneGraphPathpickClosest(int xpos, int ypos, int flag)
     Returns a reference to the item that is closest to the viewer and is Pickable below the BranchGroup (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space.
Parameters:
  xpos - The value along the x-axis.
Parameters:
  ypos - The value along the y-axis.
Parameters:
  flag - Specifys picking by Geometry or Bounds.
public  NodepickNode(SceneGraphPath sgPath, int flags)
     Returns a reference to a Pickable Node that is of the specified type that is contained in the specified SceneGraphPath. If more than one node of the same type is encountered, the node closest to the terminal node of SceneGraphPath will be returned.
Parameters:
  sgPath - the SceneGraphPath to be traversed.
Parameters:
  flags - the Node types interested in picking.
public  NodepickNode(SceneGraphPath sgPath, int flags, int occurrence)
     Returns a reference to a Pickable Node that is of the specified type that is contained in the specified SceneGraphPath. The Node returned is the nth occurrence of a Node that is of the specified type.
Parameters:
  sgPath - the SceneGraphPath to be traversed.
Parameters:
  flags - the Node types interested.
Parameters:
  occurrence - the occurrence of a Node thatmatches the specified type to return.

Field Detail
BRANCH_GROUP
final public static int BRANCH_GROUP(Code)
A flag to indicate to the pickNode method to return a BranchGroup node from a given SceneGraphPath.
See Also:   PickObject.pickNode
See Also:   



GROUP
final public static int GROUP(Code)
A flag to indicate to the pickNode method to return a Group node from a given SceneGraphPath.
See Also:   PickObject.pickNode
See Also:   



LINK
final public static int LINK(Code)
A flag to indicate to the pickNode method to return a Link node from a given SceneGraphPath.
See Also:   PickObject.pickNode
See Also:   



MORPH
final public static int MORPH(Code)
A flag to indicate to the pickNode method to return a Morph node from a given SceneGraphPath.
See Also:   PickObject.pickNode
See Also:   



PRIMITIVE
final public static int PRIMITIVE(Code)
A flag to indicate to the pickNode method to return a Primitive node from a given SceneGraphPath.
See Also:   PickObject.pickNode
See Also:   



SHAPE3D
final public static int SHAPE3D(Code)
A flag to indicate to the pickNode method to return a Shape3D node from a given SceneGraphPath.
See Also:   PickObject.pickNode
See Also:   



SWITCH
final public static int SWITCH(Code)
A flag to indicate to the pickNode method to return a Switch node from a given SceneGraphPath.
See Also:   PickObject.pickNode
See Also:   



TRANSFORM_GROUP
final public static int TRANSFORM_GROUP(Code)
A flag to indicate to the pickNode method to return a TransformGroup node from a given SceneGraphPath.
See Also:   PickObject.pickNode
See Also:   



USE_BOUNDS
final public static int USE_BOUNDS(Code)
Set this flag if you want to pick by bounds.



USE_GEOMETRY
final public static int USE_GEOMETRY(Code)
Set this flag if you want to pick by geometry.



canvas
Canvas3D canvas(Code)



debug
final static boolean debug(Code)



direction
Vector3d direction(Code)



origin
Point3d origin(Code)



pickBy
int pickBy(Code)



pickRay
PickRay pickRay(Code)



pickRoot
BranchGroup pickRoot(Code)



sceneGraphPath
SceneGraphPath sceneGraphPath(Code)



sceneGraphPathArr
SceneGraphPath sceneGraphPathArr(Code)




Constructor Detail
PickObject
public PickObject(Canvas3D c, BranchGroup root)(Code)
Creates a PickObject.
Parameters:
  c - Current J3D canvas.
Parameters:
  root - The portion of the scenegraph for which picking is to occuron. It has to be a BranchGroup.
See Also:   BranchGroup
See Also:   Canvas3D




Method Detail
generatePickRay
public PickShape generatePickRay(int xpos, int ypos)(Code)
Creates a PickRay that starts at the viewer position and points into the scene in the direction of (xpos, ypos) specified in window space.
Parameters:
  xpos - The value along the x-axis.
Parameters:
  ypos - The value along the y-axis. A PickShape object that is the constructed PickRay.



pickAll
public SceneGraphPath[] pickAll(int xpos, int ypos)(Code)
Returns an array referencing all the items that are pickable below the BranchGroup (specified in the PickObject constructor) that intersect with a ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) specified in window space. The resultant array is unordered.
Parameters:
  xpos - The value along the x-axis.
Parameters:
  ypos - The value along the y-axis. The array of SceneGraphPath objects that contain Objects thatwere pickedIf no pickable object is found null is returned..
See Also:   SceneGraphPath



pickAll
public SceneGraphPath[] pickAll(int xpos, int ypos, int flag)(Code)
Returns an array referencing all the items that are pickable below the BranchGroup (specified in the PickObject constructor) that intersect with a ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) specified in window space. The resultant array is unordered.
Parameters:
  xpos - The value along the x-axis.
Parameters:
  ypos - The value along the y-axis.
Parameters:
  flag - Specifys picking by Geometry or Bounds. The array of SceneGraphPath objects that contain Objects thatwere pickedIf no pickable object is found null is returned..
See Also:   SceneGraphPath



pickAllSorted
public SceneGraphPath[] pickAllSorted(int xpos, int ypos)(Code)
Returns a sorted array of references to all the Pickable items below the BranchGroup (specified in the PickObject constructor) that intersect with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space. Element [0] references the item closest to viewer.
Parameters:
  xpos - The value along the x-axis.
Parameters:
  ypos - The value along the y-axis. A sorted arrayof SceneGraphPath objects that contain Objects thatwere picked. The array is sorted from closest to farthest from theviewerIf no pickable object is found null is returned..
See Also:   SceneGraphPath



pickAllSorted
public SceneGraphPath[] pickAllSorted(int xpos, int ypos, int flag)(Code)
Returns a sorted array of references to all the Pickable items below the BranchGroup (specified in the PickObject constructor) that intersect with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space. Element [0] references the item closest to viewer.
Parameters:
  xpos - The value along the x-axis.
Parameters:
  ypos - The value along the y-axis.
Parameters:
  flag - Specifys picking by Geometry or Bounds. A sorted arrayof SceneGraphPath objects that contain Objects thatwere picked. The array is sorted from closest to farthest from theviewerIf no pickable object is found null is returned..
See Also:   SceneGraphPath



pickAny
public SceneGraphPath pickAny(int xpos, int ypos)(Code)
Returns a reference to any item that is Pickable below the specified BranchGroup (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in window space.
Parameters:
  xpos - The value along the x-axis.
Parameters:
  ypos - The value along the y-axis. A SceneGraphPath of an object that was picked. This is notguarenteed to return the same result for multiple picksIf no pickable object is found null is returned..
See Also:   SceneGraphPath



pickAny
public SceneGraphPath pickAny(int xpos, int ypos, int flag)(Code)
Returns a reference to any item that is Pickable below the specified BranchGroup (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in window space.
Parameters:
  xpos - The value along the x-axis.
Parameters:
  ypos - The value along the y-axis.
Parameters:
  flag - Specifys picking by Geometry or Bounds. A SceneGraphPath of an object that was picked. This is notguarenteed to return the same result for multiple picksIf no pickable object is found null is returned..
See Also:   SceneGraphPath



pickClosest
public SceneGraphPath pickClosest(int xpos, int ypos)(Code)
Returns a reference to the item that is closest to the viewer and is Pickable below the BranchGroup (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space.
Parameters:
  xpos - The value along the x-axis.
Parameters:
  ypos - The value along the y-axis. A SceneGraphPath which contains the closest pickable object.If no pickable object is found, null is returned.
See Also:   SceneGraphPath



pickClosest
public SceneGraphPath pickClosest(int xpos, int ypos, int flag)(Code)
Returns a reference to the item that is closest to the viewer and is Pickable below the BranchGroup (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space.
Parameters:
  xpos - The value along the x-axis.
Parameters:
  ypos - The value along the y-axis.
Parameters:
  flag - Specifys picking by Geometry or Bounds. A SceneGraphPath which contains the closest pickable object.If no pickable object is found, null is returned.
See Also:   SceneGraphPath



pickNode
public Node pickNode(SceneGraphPath sgPath, int flags)(Code)
Returns a reference to a Pickable Node that is of the specified type that is contained in the specified SceneGraphPath. If more than one node of the same type is encountered, the node closest to the terminal node of SceneGraphPath will be returned.
Parameters:
  sgPath - the SceneGraphPath to be traversed.
Parameters:
  flags - the Node types interested in picking. the first occurrence of the specified Node typestarting from the terminal node of SceneGraphPath. If no pickable object is found of the specifed types, null is returned.



pickNode
public Node pickNode(SceneGraphPath sgPath, int flags, int occurrence)(Code)
Returns a reference to a Pickable Node that is of the specified type that is contained in the specified SceneGraphPath. The Node returned is the nth occurrence of a Node that is of the specified type.
Parameters:
  sgPath - the SceneGraphPath to be traversed.
Parameters:
  flags - the Node types interested.
Parameters:
  occurrence - the occurrence of a Node thatmatches the specified type to return. An occurrence of1 means to return the first occurrence of that object type (the objectclosest to the Locale). the nth occurrence of a Nodeof type flags, starting from the Locale. If no pickable object is found, null is returned.



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.