org.xith3d.picking
Class PickRequest

java.lang.Object
  extended by org.xith3d.picking.PickRequest

public class PickRequest
extends java.lang.Object

An instance of this class hold all information to perform a picking.


Constructor Summary
PickRequest()
          Generates a new ScheduledPicker instance.
 
Method Summary
 AllPickListener getAllPickListener()
           
 org.jagatoo.input.devices.components.MouseButton getButton()
           
 Canvas3D getCanvas()
           
 java.util.List<GroupNode> getGroups()
           
 int getMouseX()
           
 int getMouseY()
           
 NearestPickListener getNearestPickListener()
           
 boolean getPickAll()
           
 java.util.List<RenderPass> getRenderPasses()
           
 java.lang.Object getUserObject()
           
 void init(java.util.List<RenderPass> renderPasses, java.util.List<? extends GroupNode> groups, Canvas3D canvas, org.jagatoo.input.devices.components.MouseButton button, int mouseX, int mouseY, java.lang.Object pl, java.lang.Object userObject, boolean pickAll)
          Generates a new ScheduledPicker instance.
 void init(RenderPass renderPass, GroupNode group, Canvas3D canvas, org.jagatoo.input.devices.components.MouseButton button, int mouseX, int mouseY, java.lang.Object pl, java.lang.Object userObject, boolean pickAll)
          Generates a new ScheduledPicker instance.
 void setUserObject(java.lang.Object userObject)
          Assotiotes a new user object with this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PickRequest

public PickRequest()
Generates a new ScheduledPicker instance.

Method Detail

getRenderPasses

public java.util.List<RenderPass> getRenderPasses()

getGroups

public java.util.List<GroupNode> getGroups()

getUserObject

public final java.lang.Object getUserObject()
Returns:
the user object assotiated with this instance if any

setUserObject

public final void setUserObject(java.lang.Object userObject)
Assotiotes a new user object with this instance.


getAllPickListener

public final AllPickListener getAllPickListener()
Returns:
the Listener for the picking result

getNearestPickListener

public final NearestPickListener getNearestPickListener()
Returns:
the Listener for the picking result

getCanvas

public Canvas3D getCanvas()
Returns:
the Canvas3D-instance on which the picking was done

getButton

public final org.jagatoo.input.devices.components.MouseButton getButton()

getMouseX

public final int getMouseX()
Returns:
the mouse-x coordinate whre the picking should be made

getMouseY

public final int getMouseY()
Returns:
the mouse-x coordinate whre the picking should be made

getPickAll

public final boolean getPickAll()

init

public void init(java.util.List<RenderPass> renderPasses,
                 java.util.List<? extends GroupNode> groups,
                 Canvas3D canvas,
                 org.jagatoo.input.devices.components.MouseButton button,
                 int mouseX,
                 int mouseY,
                 java.lang.Object pl,
                 java.lang.Object userObject,
                 boolean pickAll)
Generates a new ScheduledPicker instance.

Parameters:
renderPasses -
groups - the List of GroupNodes to do the picking on
canvas - the canvas to do the picking on
button - the mouse button, that was clicked
mouseX - the x-position of the mouse on the canvas
mouseY - the y-position of the mouse on the canvas
pl - the picklistener to use for callback when picking is done
userObject - this user object is passed back to the onNodePicked() method

init

public void init(RenderPass renderPass,
                 GroupNode group,
                 Canvas3D canvas,
                 org.jagatoo.input.devices.components.MouseButton button,
                 int mouseX,
                 int mouseY,
                 java.lang.Object pl,
                 java.lang.Object userObject,
                 boolean pickAll)
Generates a new ScheduledPicker instance.

Parameters:
renderPass -
group - the List of GroupNodes to do the picking on
canvas - the canvas to do the picking on
button - the mouse button, that was clicked
mouseX - the x-position of the mouse on the canvas
mouseY - the y-position of the mouse on the canvas
pl - the picklistener to use for callback when picking is done
userObject - this user object is passed back to the onNodePicked() method
pickAll - if true, all picked shapes are returned as results, but not only the nearest one