Package javax.media.j3d
Class PickInfo.IntersectionInfo
java.lang.Object
javax.media.j3d.PickInfo.IntersectionInfo
- Enclosing class:
PickInfo
The IntersectionInfo object holds extra information about an intersection
of a PickShape with a Node as part of a PickInfo. Information such as
the intersected geometry, the intersected point, and the vertex indices
can be inquired.
The local coordinates, normal, color and texture coordiantes of at the
intersection can be computed, if they are present and readable, using the
interpolation weights and vertex indices.
If the Shape3D being picked has multiple geometry arrays, the possible arrays of IntersectionInfo are stored in the PickInfo and referred to by a geometry index. If the picked geometry is of type, Text3D or CompressGeometry, getVertexIndices is invalid. If the picked Node is an Morph object, the geometry used in pick computation is alway at index 0.
- Since:
- Java 3D 1.4
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Retrieves the distance between the start point of the pickShape and the intersection point.Retrieves the reference to the intersected geometry in the picked object, either a Shape3D or Morph.int
Retrieves the index to the intersected geometry in the picked node, either a Shape3D or Morph.javax.vecmath.Point3d
Retrieves the reference to the intersection point in the pickable node.int[]
Retrieves the vertex indices of the intersected primitive in the geometry.
-
Method Details
-
getGeometryIndex
public int getGeometryIndex()Retrieves the index to the intersected geometry in the picked node, either a Shape3D or Morph.- Returns:
- the index of the intersected geometry in the pickable node.
-
getGeometry
Retrieves the reference to the intersected geometry in the picked object, either a Shape3D or Morph.- Returns:
- the intersected geometry in the pickable node.
-
getIntersectionPoint
public javax.vecmath.Point3d getIntersectionPoint()Retrieves the reference to the intersection point in the pickable node.- Returns:
- the intersected point in the pickable node.
-
getDistance
public double getDistance()Retrieves the distance between the start point of the pickShape and the intersection point.- Returns:
- distance between the start point of the pickShape and the intersection point.
-
getVertexIndices
public int[] getVertexIndices()Retrieves the vertex indices of the intersected primitive in the geometry.- Returns:
- the vertex indices of the intersected primitive.
-