Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.media.j3d
Class PickInfo.IntersectionInfo

    java.lang.Object
      javax.media.j3d.PickInfo.IntersectionInfo

Enclosing class:
  PickInfo

    public class PickInfo.IntersectionInfo

extends java.lang.Object

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
`double` | `getDistance()` Retrieves the distance between the start point of the pickShape and the intersection point.
`Geometry` | `getGeometry()` Retrieves the reference to the intersected geometry in the picked object, either a Shape3D or Morph.
`int` | `getGeometryIndex()` Retrieves the index to the intersected geometry in the picked node, either a Shape3D or Morph.
`Point3d` | `getIntersectionPoint()` Retrieves the reference to the intersection point in the pickable node.
`int[]` | `getVertexIndices()` Retrieves the vertex indices of the intersected primitive in the geometry.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### 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

    public Geometry 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 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.