|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.java.joglutils.msg.actions.Action
net.java.joglutils.msg.actions.RayPickAction
public class RayPickAction
Constructor Summary | |
---|---|
RayPickAction()
|
Method Summary | |
---|---|
static void |
addActionMethod(Class<? extends Node> nodeType,
Method m)
Adds an action method for the given node type to this action. |
void |
addPickedPoint(PickedPoint p,
float t)
Registers a picked point with the RayPickAction during scene graph traversal. |
void |
apply(Node node)
Applies this Action to a particular node. |
Line |
getComputedRay()
Returns the computed 3D ray in world coordinates that this RayPickAction is using for its picking. |
static State |
getDefaultState()
Returns the default state all instances of this class are initialized with. |
PickedPoint |
getPickedPoint()
Returns the closest point to the camera this action selected during the last traversal, or null if no points were picked. |
List<PickedPoint> |
getPickedPoints()
Returns the list of points this action selected during the last traversal, sorted in increasing order of distance from the camera. |
State |
getState()
Returns the global state this action encompasses, which is altered by the nodes the action traverses. |
static void |
rayPick(RayPickAction action,
Node node)
Action method which dispatches to per-node rendering functionality. |
void |
recomputeRay(Camera camera)
Called during scene graph traversal to update the 3D ray associated with this action if it was configured with on-screen coordinates. |
void |
setNormalizedPoint(Vec2f normalizedPoint)
Sets the normalized point for this RayPickAction, where x and y are relative to the lower-left of the viewport and range from [0..1]. |
void |
setPoint(int x,
int y,
Component component)
Sets the point for this RayPickAction based on x and y coordinates relative to the specified AWT Component. |
void |
setRay(Line ray)
Sets the ray in world coordinates that this RayPickAction should use for its computation. |
Methods inherited from class net.java.joglutils.msg.actions.Action |
---|
apply, getPath |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RayPickAction()
Method Detail |
---|
public static State getDefaultState()
public static void addActionMethod(Class<? extends Node> nodeType, Method m)
public State getState()
Action
getState
in class Action
public void apply(Node node)
Action
apply
in class Action
public void setPoint(int x, int y, Component component)
public void setNormalizedPoint(Vec2f normalizedPoint)
public void setRay(Line ray)
public List<PickedPoint> getPickedPoints()
public PickedPoint getPickedPoint()
public Line getComputedRay()
public void recomputeRay(Camera camera)
public void addPickedPoint(PickedPoint p, float t)
public static void rayPick(RayPickAction action, Node node)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |