public class PickResult extends Object
Modifier and Type | Field and Description |
---|---|
static int |
FACE_UNDEFINED
An undefined face.
|
Constructor and Description |
---|
PickResult(EventTarget target,
double sceneX,
double sceneY)
Creates a pick result for a 2D case where no additional information is needed.
|
PickResult(Node node,
Point3D point,
double distance)
Creates a new instance of PickResult for a non-3d-shape target.
|
PickResult(Node node,
Point3D point,
double distance,
int face,
Point2D texCoord)
Creates a new instance of PickResult.
|
PickResult(Node node,
Point3D point,
double distance,
int face,
Point3D normal,
Point2D texCoord)
Creates a new instance of PickResult.
|
Modifier and Type | Method and Description |
---|---|
double |
getIntersectedDistance()
Returns the intersected distance between camera position
and the intersected point.
|
int |
getIntersectedFace()
Returns the intersected face of the picked Node, FACE_UNDEFINED
if the node doesn't have user-specified faces
or was picked on bounds.
|
Node |
getIntersectedNode()
Returns the intersected node.
|
Point3D |
getIntersectedNormal()
Return the intersected normal of the picked 3d shape.
|
Point3D |
getIntersectedPoint()
Returns the intersected point in local coordinate of the picked Node.
|
Point2D |
getIntersectedTexCoord()
Return the intersected texture coordinates of the picked 3d shape.
|
String |
toString() |
public static final int FACE_UNDEFINED
public PickResult(Node node, Point3D point, double distance, int face, Point2D texCoord)
node
- The intersected nodepoint
- The intersected point in local coordinate of the picked Nodedistance
- The intersected distance between camera position and the picked Nodeface
- The intersected face of the picked NodetexCoord
- The intersected texture coordinates of the picked Nodepublic PickResult(Node node, Point3D point, double distance, int face, Point3D normal, Point2D texCoord)
node
- The intersected nodepoint
- The intersected point in local coordinate of the picked Nodedistance
- The intersected distance between camera position and the picked Nodeface
- The intersected face of the picked NodetexCoord
- The intersected texture coordinates of the picked Nodenormal
- The intersected normal of the picked Nodepublic PickResult(Node node, Point3D point, double distance)
node
- The intersected nodepoint
- The intersected point in local coordinate of the picked Nodedistance
- The intersected distance between camera position and the picked Nodepublic PickResult(EventTarget target, double sceneX, double sceneY)
target
- The picked target (null in case of a Scene)sceneX
- The scene X coordinatesceneY
- The scene Y coordinatepublic final Node getIntersectedNode()
public final Point3D getIntersectedPoint()
public final double getIntersectedDistance()
public final int getIntersectedFace()
public final Point3D getIntersectedNormal()
public final Point2D getIntersectedTexCoord()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.