|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.j3d.PickInfo.IntersectionInfo
public class PickInfo.IntersectionInfo
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.
Field Summary | |
---|---|
private double |
distance
|
private Geometry |
geom
|
private int |
geomIndex
|
private Point3d |
intersectionPoint
|
private int[] |
vertexIndices
|
Constructor Summary | |
---|---|
PickInfo.IntersectionInfo()
IntersectionInfo Constructor |
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. |
(package private) void |
setDistance(double distance)
|
(package private) void |
setGeometry(Geometry geom)
|
(package private) void |
setGeometryIndex(int geomIndex)
|
(package private) void |
setIntersectionPoint(Point3d intersectionPoint)
|
(package private) void |
setVertexIndices(int[] vertexIndices)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int geomIndex
private Geometry geom
private Point3d intersectionPoint
private double distance
private int[] vertexIndices
Constructor Detail |
---|
PickInfo.IntersectionInfo()
Method Detail |
---|
void setGeometryIndex(int geomIndex)
void setGeometry(Geometry geom)
void setIntersectionPoint(Point3d intersectionPoint)
void setDistance(double distance)
void setVertexIndices(int[] vertexIndices)
public int getGeometryIndex()
public Geometry getGeometry()
public Point3d getIntersectionPoint()
public double getDistance()
public int[] getVertexIndices()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |