public class PickResult
extends java.lang.Object
A pick result has a list of nodes, ordered parent to child, that represents the path from the root node to the picked node. The last node in the list is the picked node.
A pick result also has a point of intersection with a pick shape. This point may be obtained in either the local or world coordinate system, and its depth (z) may be obtained in pixel coordinates.
Constructor and Description |
---|
PickResult(PickContext pc,
Point3 point)
Constructs a new pick result in the specified context.
|
Modifier and Type | Method and Description |
---|---|
Dragable |
getDragableNode()
Gets a node in this result that is dragable.
|
Matrix44 |
getLocalToPixel()
Gets the local-to-pixel coordinate transform matrix.
|
Matrix44 |
getLocalToWorld()
Gets the local-to-world coordinate transform matrix.
|
java.awt.event.MouseEvent |
getMouseEvent()
Gets the mouse event for this pick result.
|
Node |
getNode()
Gets the picked node in this result.
|
Node |
getNode(java.lang.Class<?> nodeClass)
Gets a node in this result that is an instance of the specified class.
|
Node[] |
getNodes()
Gets the array of nodes in this result.
|
double |
getPixelZ()
Gets the pixel z (depth) coordinate of the picked point.
|
Point3 |
getPointLocal()
Gets the picked point in local coordinates.
|
Point3 |
getPointPixel()
Gets the picked point in pixel coordinates.
|
Point3 |
getPointWorld()
Gets the picked point in world coordinates.
|
Selectable |
getSelectableNode()
Gets a node in this result that is selectable.
|
View |
getView()
Gets the view for which this pick result was constructed.
|
ViewCanvas |
getViewCanvas()
Gets the canvas for which this pick result was constructed.
|
World |
getWorld()
Gets the world for which this pick result was constructed.
|
Matrix44 |
getWorldToPixel()
Gets the world-to-pixel coordinate transform matrix.
|
public PickResult(PickContext pc, Point3 point)
pc
- the pick context.point
- the picked point, in local coordinates.public java.awt.event.MouseEvent getMouseEvent()
public Node[] getNodes()
public Node getNode()
public Dragable getDragableNode()
Dragable
. If no such node exists, this method returns null.public Selectable getSelectableNode()
Selectable
. If no such node exists, this method returns null.public Node getNode(java.lang.Class<?> nodeClass)
public Point3 getPointLocal()
public Point3 getPointWorld()
public Point3 getPointPixel()
public double getPixelZ()
public Matrix44 getLocalToWorld()
public Matrix44 getLocalToPixel()
public Matrix44 getWorldToPixel()
public ViewCanvas getViewCanvas()
public View getView()
public World getWorld()