Class dnx.lr.RayPickTraversal
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dnx.lr.RayPickTraversal

java.lang.Object
   |
   +----dnx.util.DNXObject
           |
           +----dnx.util.DNXInstancedObject
                   |
                   +----dnx.lr.Action
                           |
                           +----dnx.lr.Traversal
                                   |
                                   +----dnx.lr.InstanceTraversal
                                           |
                                           +----dnx.lr.TraversalPathTraversal
                                                   |
                                                   +----dnx.lr.InstancePathTraversal
                                                           |
                                                           +----dnx.lr.InstanceReturningTraversal
                                                                   |
                                                                   +----dnx.lr.SubtreePropertyTraversal
                                                                           |
                                                                           +----dnx.lr.Graphics3DTraversal
                                                                                   |
                                                                                   +----dnx.lr.PickTraversal
                                                                                           |
                                                                                           +----dnx.lr.RayPickTraversal

public class RayPickTraversal
extends PickTraversal
A RayPickTraversal conceptually shoots a ray into a scene and returns either the closest object hit by the ray, or all objects hit by the ray. This is what you want if you want to find the object or objects under the mouse.

Variable Index

 o PICK_ALL
 o PICK_CLOSEST

Constructor Index

 o RayPickTraversal()
Create a traversal with default contextInterest.
 o RayPickTraversal(int)
Create a traversal with specified contextInterest.

Method Index

 o begin(NodeInstance)
Don't call this yourself.
 o enter(NodeInstance)
Don't call this yourself.
 o getInterest()
Return the pick interest.
 o getLimit()
 o getRay()
 o leave(NodeInstance)
Don't call this yourself.
 o setInterest(int)
Set the pick interest (i.e.
 o setLimit(float)
Set the maximum distance that the pick will investigate.
 o setRay(Ray3)
Set the ray for picking.
 o visit(NodeInstance)
Don't call this yourself.

Variables

 o PICK_CLOSEST
  public final static int PICK_CLOSEST
 o PICK_ALL
  public final static int PICK_ALL

Constructors

 o RayPickTraversal
  public RayPickTraversal()
Create a traversal with default contextInterest.
 o RayPickTraversal
  public RayPickTraversal(int contextInterest)
Create a traversal with specified contextInterest. Note that instance recording is set to true by default.

Methods

 o setRay
  public void setRay(Ray3 ray)
Set the ray for picking.
 o setInterest
  public void setInterest(int interest)
Set the pick interest (i.e. whether you want the closest node instance, or all node instances). Default is PICK_CLOSEST. @param interest one of the constants PICK_CLOSEST or PICK_ALL
 o getInterest
  public int getInterest()
Return the pick interest.
 o setLimit
  public void setLimit(float limit)
Set the maximum distance that the pick will investigate. Objects past this distance won't be returned.
 o getLimit
  public float getLimit()
 o getRay
  public Ray3 getRay()
 o begin
  public void begin(NodeInstance inst)
Don't call this yourself.
Overrides:
begin in class PickTraversal
 o enter
  public void enter(NodeInstance inst)
Don't call this yourself. It's called automatically.
Overrides:
enter in class Graphics3DTraversal
 o leave
  public void leave(NodeInstance inst)
Don't call this yourself. It's called automatically.
Overrides:
leave in class Graphics3DTraversal
 o visit
  public int visit(NodeInstance inst)
Don't call this yourself. It's called automatically.
Overrides:
visit in class InstanceTraversal

All Packages  Class Hierarchy  This Package  Previous  Next  Index