Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.j3d.utils.behaviors.picking
Class PickObject

    java.lang.Object
      com.sun.j3d.utils.behaviors.picking.PickObject

Deprecated. As of Java 3D version 1.2, replaced by `com.sun.j3d.utils.picking.PickCanvas`

    public class PickObject

extends java.lang.Object

See Also:
  `PickCanvas`

Field Summary
`static int` | `BRANCH_GROUP` Deprecated. A flag to indicate to the pickNode method to return a `BranchGroup` node from a given `SceneGraphPath`.
`static int` | `GROUP` Deprecated. A flag to indicate to the pickNode method to return a `Group` node from a given `SceneGraphPath`.
`static int` | `LINK` Deprecated. A flag to indicate to the pickNode method to return a `Link` node from a given `SceneGraphPath`.
`static int` | `MORPH` Deprecated. A flag to indicate to the pickNode method to return a `Morph` node from a given `SceneGraphPath`.
`static int` | `PRIMITIVE` Deprecated. A flag to indicate to the pickNode method to return a `Primitive` node from a given `SceneGraphPath`.
`static int` | `SHAPE3D` Deprecated. A flag to indicate to the pickNode method to return a `Shape3D` node from a given `SceneGraphPath`.
`static int` | `SWITCH` Deprecated. A flag to indicate to the pickNode method to return a `Switch` node from a given `SceneGraphPath`.
`static int` | `TRANSFORM_GROUP` Deprecated. A flag to indicate to the pickNode method to return a `TransformGroup` node from a given `SceneGraphPath`.
`static int` | `USE_BOUNDS` Deprecated. Set this flag if you want to pick by bounds.
`static int` | `USE_GEOMETRY` Deprecated. Set this flag if you want to pick by geometry.

Constructor Summary
`PickObject(Canvas3D c, BranchGroup root)` Deprecated. Creates a PickObject.

Method Summary
`PickShape` | `generatePickRay(int xpos, int ypos)` Deprecated. Creates a PickRay that starts at the viewer position and points into the scene in the direction of (xpos, ypos) specified in window space.
`SceneGraphPath[]` | `pickAll(int xpos, int ypos)` Deprecated. Returns an array referencing all the items that are pickable below the `BranchGroup` (specified in the PickObject constructor) that intersect with a ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) specified in window space.
`SceneGraphPath[]` | `pickAll(int xpos, int ypos, int flag)` Deprecated. Returns an array referencing all the items that are pickable below the `BranchGroup` (specified in the PickObject constructor) that intersect with a ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) specified in window space.
`SceneGraphPath[]` | `pickAllSorted(int xpos, int ypos)` Deprecated. Returns a sorted array of references to all the Pickable items below the `BranchGroup` (specified in the PickObject constructor) that intersect with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space.
`SceneGraphPath[]` | `pickAllSorted(int xpos, int ypos, int flag)` Deprecated. Returns a sorted array of references to all the Pickable items below the `BranchGroup` (specified in the PickObject constructor) that intersect with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space.
`SceneGraphPath` | `pickAny(int xpos, int ypos)` Deprecated. Returns a reference to any item that is Pickable below the specified `BranchGroup` (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in window space.
`SceneGraphPath` | `pickAny(int xpos, int ypos, int flag)` Deprecated. Returns a reference to any item that is Pickable below the specified `BranchGroup` (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in window space.
`SceneGraphPath` | `pickClosest(int xpos, int ypos)` Deprecated. Returns a reference to the item that is closest to the viewer and is Pickable below the `BranchGroup` (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space.
`SceneGraphPath` | `pickClosest(int xpos, int ypos, int flag)` Deprecated. Returns a reference to the item that is closest to the viewer and is Pickable below the `BranchGroup` (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space.
`Node` | `pickNode(SceneGraphPath sgPath, int flags)` Deprecated. Returns a reference to a Pickable Node that is of the specified type that is contained in the specified SceneGraphPath.
`Node` | `pickNode(SceneGraphPath sgPath, int flags, int occurrence)` Deprecated. Returns a reference to a Pickable Node that is of the specified type that is contained in the specified SceneGraphPath.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SHAPE3D

    public static final int SHAPE3D

  Deprecated.
  A flag to indicate to the pickNode method to return a `Shape3D` node from a given `SceneGraphPath`.

  See Also:
    `pickNode(javax.media.j3d.SceneGraphPath, int)`, Constant Field Values

### MORPH

    public static final int MORPH

  Deprecated.
  A flag to indicate to the pickNode method to return a `Morph` node from a given `SceneGraphPath`.

  See Also:
    `pickNode(javax.media.j3d.SceneGraphPath, int)`, Constant Field Values

### PRIMITIVE

    public static final int PRIMITIVE

  Deprecated.
  A flag to indicate to the pickNode method to return a `Primitive` node from a given `SceneGraphPath`.

  See Also:
    `pickNode(javax.media.j3d.SceneGraphPath, int)`, Constant Field Values

### LINK

    public static final int LINK

  Deprecated.
  A flag to indicate to the pickNode method to return a `Link` node from a given `SceneGraphPath`.

  See Also:
    `pickNode(javax.media.j3d.SceneGraphPath, int)`, Constant Field Values

### GROUP

    public static final int GROUP

  Deprecated.
  A flag to indicate to the pickNode method to return a `Group` node from a given `SceneGraphPath`.

  See Also:
    `pickNode(javax.media.j3d.SceneGraphPath, int)`, Constant Field Values

### TRANSFORM_GROUP

    public static final int TRANSFORM_GROUP

  Deprecated.
  A flag to indicate to the pickNode method to return a `TransformGroup` node from a given `SceneGraphPath`.

  See Also:
    `pickNode(javax.media.j3d.SceneGraphPath, int)`, Constant Field Values

### BRANCH_GROUP

    public static final int BRANCH_GROUP

  Deprecated.
  A flag to indicate to the pickNode method to return a `BranchGroup` node from a given `SceneGraphPath`.

  See Also:
    `pickNode(javax.media.j3d.SceneGraphPath, int)`, Constant Field Values

### SWITCH

    public static final int SWITCH

  Deprecated.
  A flag to indicate to the pickNode method to return a `Switch` node from a given `SceneGraphPath`.

  See Also:
    `pickNode(javax.media.j3d.SceneGraphPath, int)`, Constant Field Values

### USE_GEOMETRY

    public static final int USE_GEOMETRY

  Deprecated.
  Set this flag if you want to pick by geometry.

  See Also:
    Constant Field Values

### USE_BOUNDS

    public static final int USE_BOUNDS

  Deprecated.
  Set this flag if you want to pick by bounds.

  See Also:
    Constant Field Values

Constructor Detail

### PickObject

    public PickObject(Canvas3D c,
                      BranchGroup root)

  Deprecated.
  Creates a PickObject.

  Parameters:
    `c` - Current J3D canvas.
    `root` - The portion of the scenegraph for which picking is to occur on. It has to be a `BranchGroup`.
  See Also:
    `BranchGroup`, `Canvas3D`

Method Detail

### generatePickRay

    public PickShape generatePickRay(int xpos,
                                     int ypos)

  Deprecated.
  Creates a PickRay that starts at the viewer position and points into the scene in the direction of (xpos, ypos) specified in window space.

  Parameters:
    `xpos` - The value along the x-axis.
    `ypos` - The value along the y-axis.
  Returns:
    A PickShape object that is the constructed PickRay.

### pickAll

    public SceneGraphPath[] pickAll(int xpos,
                                    int ypos)

  Deprecated.
  Returns an array referencing all the items that are pickable below the `BranchGroup` (specified in the PickObject constructor) that intersect with a ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) specified in window space. The resultant array is unordered.

  Parameters:
    `xpos` - The value along the x-axis.
    `ypos` - The value along the y-axis.
  Returns:
    The array of SceneGraphPath objects that contain Objects that were picked If no pickable object is found `null` is returned..
  See Also:
    `SceneGraphPath`

### pickAllSorted

    public SceneGraphPath[] pickAllSorted(int xpos,
                                          int ypos)

  Deprecated.
  Returns a sorted array of references to all the Pickable items below the `BranchGroup` (specified in the PickObject constructor) that intersect with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space. Element [0] references the item closest to viewer.

  Parameters:
    `xpos` - The value along the x-axis.
    `ypos` - The value along the y-axis.
  Returns:
    A sorted arrayof SceneGraphPath objects that contain Objects that were picked. The array is sorted from closest to farthest from the viewer If no pickable object is found `null` is returned..
  See Also:
    `SceneGraphPath`

### pickAny

    public SceneGraphPath pickAny(int xpos,
                                  int ypos)

  Deprecated.
  Returns a reference to any item that is Pickable below the specified `BranchGroup` (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in window space.

  Parameters:
    `xpos` - The value along the x-axis.
    `ypos` - The value along the y-axis.
  Returns:
    A SceneGraphPath of an object that was picked. This is not guarenteed to return the same result for multiple picks If no pickable object is found `null` is returned..
  See Also:
    `SceneGraphPath`

### pickClosest

    public SceneGraphPath pickClosest(int xpos,
                                      int ypos)

  Deprecated.
  Returns a reference to the item that is closest to the viewer and is Pickable below the `BranchGroup` (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space.

  Parameters:
    `xpos` - The value along the x-axis.
    `ypos` - The value along the y-axis.
  Returns:
    A SceneGraphPath which contains the closest pickable object. If no pickable object is found, `null` is returned.
  See Also:
    `SceneGraphPath`

### pickAll

    public SceneGraphPath[] pickAll(int xpos,
                                    int ypos,
                                    int flag)

  Deprecated.
  Returns an array referencing all the items that are pickable below the `BranchGroup` (specified in the PickObject constructor) that intersect with a ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) specified in window space. The resultant array is unordered.

  Parameters:
    `xpos` - The value along the x-axis.
    `ypos` - The value along the y-axis.
    `flag` - Specifys picking by Geometry or Bounds.
  Returns:
    The array of SceneGraphPath objects that contain Objects that were picked If no pickable object is found `null` is returned..
  See Also:
    `SceneGraphPath`

### pickAllSorted

    public SceneGraphPath[] pickAllSorted(int xpos,
                                          int ypos,
                                          int flag)

  Deprecated.
  Returns a sorted array of references to all the Pickable items below the `BranchGroup` (specified in the PickObject constructor) that intersect with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space. Element [0] references the item closest to viewer.

  Parameters:
    `xpos` - The value along the x-axis.
    `ypos` - The value along the y-axis.
    `flag` - Specifys picking by Geometry or Bounds.
  Returns:
    A sorted arrayof SceneGraphPath objects that contain Objects that were picked. The array is sorted from closest to farthest from the viewer If no pickable object is found `null` is returned..
  See Also:
    `SceneGraphPath`

### pickAny

    public SceneGraphPath pickAny(int xpos,
                                  int ypos,
                                  int flag)

  Deprecated.
  Returns a reference to any item that is Pickable below the specified `BranchGroup` (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in window space.

  Parameters:
    `xpos` - The value along the x-axis.
    `ypos` - The value along the y-axis.
    `flag` - Specifys picking by Geometry or Bounds.
  Returns:
    A SceneGraphPath of an object that was picked. This is not guarenteed to return the same result for multiple picks If no pickable object is found `null` is returned..
  See Also:
    `SceneGraphPath`

### pickClosest

    public SceneGraphPath pickClosest(int xpos,
                                      int ypos,
                                      int flag)

  Deprecated.
  Returns a reference to the item that is closest to the viewer and is Pickable below the `BranchGroup` (specified in the PickObject constructor) which intersects with the ray that starts at the viewer position and points into the scene in the direction of (xpos, ypos) in the window space.

  Parameters:
    `xpos` - The value along the x-axis.
    `ypos` - The value along the y-axis.
    `flag` - Specifys picking by Geometry or Bounds.
  Returns:
    A SceneGraphPath which contains the closest pickable object. If no pickable object is found, `null` is returned.
  See Also:
    `SceneGraphPath`

### pickNode

    public Node pickNode(SceneGraphPath sgPath,
                         int flags)

  Deprecated.
  Returns a reference to a Pickable Node that is of the specified type that is contained in the specified SceneGraphPath. If more than one node of the same type is encountered, the node closest to the terminal node of SceneGraphPath will be returned.

  Parameters:
    `sgPath` - the SceneGraphPath to be traversed.
    `flags` - the Node types interested in picking.
  Returns:
    the first occurrence of the specified Node type starting from the terminal node of SceneGraphPath. If no pickable object is found of the specifed types, `null` is returned.

### pickNode

    public Node pickNode(SceneGraphPath sgPath,
                         int flags,
                         int occurrence)

  Deprecated.
  Returns a reference to a Pickable Node that is of the specified type that is contained in the specified SceneGraphPath. The Node returned is the nth `occurrence` of a Node that is of the specified type.

  Parameters:
    `sgPath` - the SceneGraphPath to be traversed.
    `flags` - the Node types interested.
    `occurrence` - the occurrence of a Node that matches the specified type to return. An `occurrence` of 1 means to return the first occurrence of that object type (the object closest to the Locale).
  Returns:
    the nth `occurrence` of a Node of type `flags`, starting from the Locale. If no pickable object is found, `null` is returned.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD