Class PickResult

java.lang.Object
javafx.scene.input.PickResult

public class PickResult extends Object
Author:
Bruno Salmon
  • Constructor Details

    • PickResult

      public PickResult(Node node, Point2D point)
      Creates a new instance of PickResult for a non-3d-shape target. Sets face to FACE_UNDEFINED and texCoord to null.
      Parameters:
      node - The intersected node
      point - The intersected point in local coordinate of the picked Node
    • PickResult

      public PickResult(EventTarget target, double sceneX, double sceneY)
      Creates a pick result for a 2D case where no additional information is needed. Converts the given scene coordinates to the target's local coordinate space and stores the value as the intersected point. Sets intersected node to the given target, distance to 1.0, face to FACE_UNDEFINED and texCoord to null.
      Parameters:
      target - The picked target (null in case of a Scene)
      sceneX - The scene X coordinate
      sceneY - The scene Y coordinate
  • Method Details

    • getIntersectedPoint

      public Point2D getIntersectedPoint()
    • getIntersectedNode

      public Node getIntersectedNode()