|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface which represents a Picker and provides required methods.
Field Summary | |
static int |
MATRIX
|
static int |
NORMAL
|
static int |
POINT
|
Method Summary | |
float[] |
getPickInfo(int which)
Gets any info that was requested (prior to performing the pick) by setting flags in setPickInfo . |
boolean |
pickAny(int x,
int y)
Given a pixel coordinate assumed to be in the viewer's window, returns a boolean stating whether any geometry in the scene was intersected by the ray from the eyepoint through the pixel. |
boolean |
pickAnyFromTo(float[] from,
float[] to)
Given a ray described as going from the 'from' point and towards the 'to' point, returns a boolean stating whether any geometry in the scene was intersected by the ray. |
Node[] |
pickClosest(int x,
int y)
Given a pixel coordinate assumed to be in the viewer's window, constructs a ray from the location of the viewer's currently bound Viewpoint, then intersects. |
Node[] |
pickClosestFromTo(float[] from,
float[] to)
Given a ray described as going from the 'from' point and towards the 'to' point, intersects that ray. |
void |
setPath(Node[] path)
Establishes a new path for the picker to usre for ray intersection. |
void |
setPickInfo(int which,
boolean doCalculation)
Tells the Picker which information it needs to collect as it traverses the scene graph in order to Pick. |
void |
setScene(Node root)
Establishes a new scene graph for the picker to use for ray intersection. |
boolean |
wasPicked(Node node)
After performing a pick, this returns true if the given node was on the path to the pick. |
Field Detail |
public static final int POINT
public static final int NORMAL
public static final int MATRIX
Method Detail |
public void setPickInfo(int which, boolean doCalculation)
which
- the flag indicating which info the user is specifying (POINT, NORMAL, or MATRIX)doCalculation
- whether this Picker should collect which
's infopublic void setScene(Node root)
root
- the root of the scene to pickpublic void setPath(Node[] path)
path
- the path to the subgraph to pickpublic boolean pickAny(int x, int y)
x
- the pixel's x coordinatey
- the pixel's y coordinatepublic boolean pickAnyFromTo(float[] from, float[] to)
from
- the from point of the given rayto
- the to point of the given raypublic Node[] pickClosest(int x, int y)
x
- the pixel's x coordinatey
- the pixel's y coordinatepublic Node[] pickClosestFromTo(float[] from, float[] to)
from
- the from point of the given rayto
- the to point of the given raypublic boolean wasPicked(Node node)
node
- the node to look for on the pick pathpublic float[] getPickInfo(int which) throws Shout3DException
setPickInfo
. Must be called after the
pick has been performed.
Note: Normal is undefined for lines and points.which
- the info to receive
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |