public class PickResultChooser extends Object
Constructor and Description |
---|
PickResultChooser() |
Modifier and Type | Method and Description |
---|---|
static Point3D |
computePoint(PickRay ray,
double distance)
Helper method for computing intersected point.
|
double |
getIntersectedDistance()
Returns the intersected distance between camera position and the picked Node
|
int |
getIntersectedFace()
Returns the intersected face of the picked Node
|
Node |
getIntersectedNode()
Returns the intersected Node
|
Point3D |
getIntersectedNormal()
Return the intersected normal in local coordinate of the picked Node
|
Point3D |
getIntersectedPoint()
Return the intersected point in local coordinate of the picked Node
|
Point2D |
getIntersectedTexCoord()
Return the intersected texture coordinates of the picked Node
return new Point2D presenting the intersected TexCoord
|
boolean |
isClosed()
Returns true if this chooser has been closed.
|
boolean |
isCloser(double distance)
Returns true if the given distance is smaller than the distance stored
in this instance.
|
boolean |
isEmpty()
Returns true if there is no intersection stored in this instance.
|
boolean |
offer(Node node,
double distance,
int face,
Point3D point,
Point2D texCoord)
Offers an intersection.
|
boolean |
offer(Node node,
double distance,
Point3D point)
Offers an intersection with a non-Shape3D object.
|
boolean |
offerSubScenePickResult(SubScene subScene,
PickResult pickResult,
double distance)
Offers an intersection found inside a SubScene.
|
PickResult |
toPickResult()
Converts the current content of this instance to the unmodifiable
PickResult.
|
public static Point3D computePoint(PickRay ray, double distance)
ray
- Pick ray used for pickingdistance
- Distance measured in ray direction magnitudespublic PickResult toPickResult()
public boolean isCloser(double distance)
distance
- The distance to comparepublic boolean isEmpty()
public boolean isClosed()
close()
public boolean offer(Node node, double distance, int face, Point3D point, Point2D texCoord)
node
- The intersected nodedistance
- The intersected distance measured in pickRay direction magnitudesface
- The intersected facepoint
- The intersection pointtexCoord
- The intersected texture coordinatespublic boolean offer(Node node, double distance, Point3D point)
node
- The intersected nodedistance
- The intersected distance measured in pickRay direction magnitudespoint
- The intersection pointpublic boolean offerSubScenePickResult(SubScene subScene, PickResult pickResult, double distance)
subScene
- SubScene where the result was pickedpickResult
- Picking result from the subScenedistance
- distance from the camera to the intersection point
with the subScene planepublic final Node getIntersectedNode()
public final double getIntersectedDistance()
public final int getIntersectedFace()
public final Point3D getIntersectedPoint()
public final Point3D getIntersectedNormal()
public final Point2D getIntersectedTexCoord()
Copyright © 2020. All rights reserved.