Java Doc for PickIntersection.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.PickIntersection

PickIntersection
public class PickIntersection (Code)
Holds information about an intersection of a PickShape with a Node as part of a PickInfo.IntersectionInfo. Information about the intersected geometry, intersected primitive, intersection point, and closest vertex can be inquired.

The intersected primitive indicates which primitive out of the GeometryArray was intersected (where the primitive is a point, line, triangle or quad, not a com.sun.j3d.utils.geometry.Primitive). For example, the intersection would indicate which triangle out of a triangle strip was intersected. The methods which return primitive data will have one value if the primitive is a point, two values if the primitive is a line, three values if the primitive is a triangle and four values if the primitive is quad.

The primitive's VWorld coordinates are saved when then intersection is calculated. The local coordinates, normal, color and texture coordinates for the primitive can also be inquired if they are present and readable.

The intersection point is the location on the primitive which intersects the pick shape closest to the center of the pick shape. The intersection point's location in VWorld coordinates is saved when the intersection is calculated. The local coordinates, normal, color and texture coordiantes of at the intersection can be interpolated if they are present and readable.

The closest vertex is the vertex of the primitive closest to the intersection point. The vertex index, VWorld coordinates and local coordinates of the closest vertex can be inquired. The normal, color and texture coordinate of the closest vertex can be inquired from the geometry array:

 Vector3f getNormal(PickIntersection pi, int vertexIndex) {
 int index;
 Vector3d normal = new Vector3f();
 GeometryArray ga = pickIntersection.getGeometryArray();
 if (pickIntersection.geometryIsIndexed()) {
 index = ga.getNormalIndex(vertexIndex);
 } else {
 index = vertexIndex;
 }
 ga.getNormal(index, normal);
 return normal;
 }
 

The color, normal and texture coordinate information for the intersected primitive and the intersection point can be inquired the geometry includes them and the corresponding READ capibility bits are set.



Field Summary
final static  doubleTOL
    

Constructor Summary
public  PickIntersection(Transform3D localToVWorld, PickInfo.IntersectionInfo intersectionInfo)
    

Method Summary
 doubleabs(double value)
    
public  booleangeometryIsIndexed()
    
public  Point3dgetClosestVertexCoordinates()
    
public  Point3dgetClosestVertexCoordinatesVW()
    
public  intgetClosestVertexIndex()
    
public  doublegetDistance()
    
 intgetInterleavedColorOffset(GeometryArray geo)
    
 intgetInterleavedStride(GeometryArray geo)
    
 intgetInterleavedVertexOffset(GeometryArray geo)
    
 double[]getInterpWeights()
    
public  PickInfo.IntersectionInfogetIntersectionInfo()
     Gets the IntersectionInfo this intersection is part of.
public  Color4fgetPointColor()
     Returns the color of the intersection point.
public  Point3dgetPointCoordinates()
     Returns the coordinates of the intersection point (local coordinates), if available.
public  Point3dgetPointCoordinatesVW()
     Returns the coordinates of the intersection point (world coordinates), if available.
public  Vector3fgetPointNormal()
     Returns the normal of the intersection point.
public  TexCoord3fgetPointTextureCoordinate(int index)
     Returns the texture coordinate of the intersection point at the specifed index in the specified texture coordinate set. Returns null if the geometry does not contain texture coordinates.
public  int[]getPrimitiveColorIndices()
     Get the color indices for the intersected primitive.
public  Color4f[]getPrimitiveColors()
     Get the colors of the intersected primitive.
public  int[]getPrimitiveCoordinateIndices()
     Get the coordinates indices for the intersected primitive.
public  Point3d[]getPrimitiveCoordinates()
    
public  Point3d[]getPrimitiveCoordinatesVW()
    
public  int[]getPrimitiveNormalIndices()
     Get the normal indices for the intersected primitive.
public  Vector3f[]getPrimitiveNormals()
     Get the normals of the intersected primitive.
public  int[]getPrimitiveTexCoordIndices(int index)
     Get the texture coordinate indices for the intersected primitive at the specifed index in the specified texture coordinate set.
public  TexCoord3f[]getPrimitiveTexCoords(int index)
     Get the texture coordinates of the intersected primitive at the specifed index in the specified texture coordinate set. null if the primitive does not contain texture coordinates.
public  int[]getPrimitiveVertexIndices()
    
 booleaninterpTriangle(int index0, int index1, int index2, Point3d[] coords, Point3d intPt)
    
 intmaxAxis(Vector3d delta)
    
public  StringtoString()
    

Field Detail
TOL
final static double TOL(Code)




Constructor Detail
PickIntersection
public PickIntersection(Transform3D localToVWorld, PickInfo.IntersectionInfo intersectionInfo)(Code)
Constructor
Parameters:
  intersectionInfo - The IntersectionInfo this intersection is part of.




Method Detail
abs
double abs(double value)(Code)



geometryIsIndexed
public boolean geometryIsIndexed()(Code)
Returns true if the geometry is indexed



getClosestVertexCoordinates
public Point3d getClosestVertexCoordinates()(Code)
Get coordinates of closest vertex (local) the coordinates of the vertex closest to the intersection point



getClosestVertexCoordinatesVW
public Point3d getClosestVertexCoordinatesVW()(Code)
Get coordinates of closest vertex (world) the coordinates of the vertex closest to the intersection point



getClosestVertexIndex
public int getClosestVertexIndex()(Code)
Get index of closest vertex the index of the closest vertex



getDistance
public double getDistance()(Code)
Get the distance from the PickShape start point to the intersection point the distance to the intersection point, if available.



getInterleavedColorOffset
int getInterleavedColorOffset(GeometryArray geo)(Code)



getInterleavedStride
int getInterleavedStride(GeometryArray geo)(Code)



getInterleavedVertexOffset
int getInterleavedVertexOffset(GeometryArray geo)(Code)
Helper methods **************************************



getInterpWeights
double[] getInterpWeights()(Code)



getIntersectionInfo
public PickInfo.IntersectionInfo getIntersectionInfo()(Code)
Gets the IntersectionInfo this intersection is part of.



getPointColor
public Color4f getPointColor()(Code)
Returns the color of the intersection point. Returns null if the geometry does not contain colors. If the geometry was defined with GeometryArray.COLOR_3, the 'w' component of the color will initialized to 1.0 color at the intersection point.



getPointCoordinates
public Point3d getPointCoordinates()(Code)
Returns the coordinates of the intersection point (local coordinates), if available. coordinates of the intersection point



getPointCoordinatesVW
public Point3d getPointCoordinatesVW()(Code)
Returns the coordinates of the intersection point (world coordinates), if available. coordinates of the point



getPointNormal
public Vector3f getPointNormal()(Code)
Returns the normal of the intersection point. Returns null if the geometry does not contain normals. normal at the intersection point.



getPointTextureCoordinate
public TexCoord3f getPointTextureCoordinate(int index)(Code)
Returns the texture coordinate of the intersection point at the specifed index in the specified texture coordinate set. Returns null if the geometry does not contain texture coordinates. If the geometry was defined with GeometryArray.TEXTURE_COORDINATE_3, the 'z' component of the texture coordinate will initialized to 0.0 texture coordinate at the intersection point.



getPrimitiveColorIndices
public int[] getPrimitiveColorIndices()(Code)
Get the color indices for the intersected primitive. For a non-indexed primitive, this will be the same as the primitive vertex indices If the geometry array does not contain colors this will return null. an array indices



getPrimitiveColors
public Color4f[] getPrimitiveColors()(Code)
Get the colors of the intersected primitive. This will return null if the primitive does not contain colors. If the geometry was defined using GeometryArray.COLOR_3, the 'w' value of the color will be set to 1.0. an array of Point3d's for the primitive that was intersected



getPrimitiveCoordinateIndices
public int[] getPrimitiveCoordinateIndices()(Code)
Get the coordinates indices for the intersected primitive. For a non-indexed primitive, this will be the same as the primitive vertex indices an array indices



getPrimitiveCoordinates
public Point3d[] getPrimitiveCoordinates()(Code)
Get the local coordinates intersected primitive an array of Point3d's for the primitive that was intersected



getPrimitiveCoordinatesVW
public Point3d[] getPrimitiveCoordinatesVW()(Code)
Get VWorld coordinates of the intersected primitive an array of Point3d's for the primitive that was picked



getPrimitiveNormalIndices
public int[] getPrimitiveNormalIndices()(Code)
Get the normal indices for the intersected primitive. For a non-indexed primitive, this will be the same as the primitive vertex indices If the geometry array does not contain normals this will return null an array indices



getPrimitiveNormals
public Vector3f[] getPrimitiveNormals()(Code)
Get the normals of the intersected primitive. This will return null if the primitive does not contain normals. an array of Point3d's for the primitive that was intersected



getPrimitiveTexCoordIndices
public int[] getPrimitiveTexCoordIndices(int index)(Code)
Get the texture coordinate indices for the intersected primitive at the specifed index in the specified texture coordinate set. For a non-indexed primitive, this will be the same as the primitive vertex indices If the geometry array does not contain texture coordinates, this will return null. an array indices



getPrimitiveTexCoords
public TexCoord3f[] getPrimitiveTexCoords(int index)(Code)
Get the texture coordinates of the intersected primitive at the specifed index in the specified texture coordinate set. null if the primitive does not contain texture coordinates. If the geometry was defined using GeometryArray.TEXTURE_COORDINATE_2, the 'z' value of the texture coordinate will be set to 0.0. an array of TexCoord3f's for the primitive that was intersected



getPrimitiveVertexIndices
public int[] getPrimitiveVertexIndices()(Code)
Get vertex indices of the intersected primitive an array which contains the list of indices



interpTriangle
boolean interpTriangle(int index0, int index1, int index2, Point3d[] coords, Point3d intPt)(Code)



maxAxis
int maxAxis(Vector3d delta)(Code)



toString
public String toString()(Code)
String representation of this object



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.