|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.j3d.utils.behaviors.picking.PickObject
com.sun.j3d.utils.picking.PickCanvas
public class PickObject
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 . |
(package private) Canvas3D |
canvas
Deprecated. |
(package private) static boolean |
debug
Deprecated. |
(package private) Vector3d |
direction
Deprecated. |
private double[] |
distance
Deprecated. |
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 . |
(package private) Point3d |
origin
Deprecated. |
(package private) int |
pickBy
Deprecated. |
(package private) PickRay |
pickRay
Deprecated. |
(package private) BranchGroup |
pickRoot
Deprecated. |
private int[] |
position
Deprecated. Sort the elements in sgpArr and return the sorted list in SceneGraphPath Sorts on the distance but also adjusts an array of positions this allows the sort to operate on small data elements rather than the possibly large SceneGraphPath Initial implementation is a Quick Sort |
static int |
PRIMITIVE
Deprecated. A flag to indicate to the pickNode method to return a Primitive node
from a given SceneGraphPath . |
(package private) SceneGraphPath |
sceneGraphPath
Deprecated. |
(package private) SceneGraphPath[] |
sceneGraphPathArr
Deprecated. |
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. |
private SceneGraphPath[] |
pickGeomAll(int xpos,
int ypos)
Deprecated. |
private SceneGraphPath[] |
pickGeomAllSorted(int xpos,
int ypos)
Deprecated. |
private SceneGraphPath |
pickGeomAny(int xpos,
int ypos)
Deprecated. |
private SceneGraphPath |
pickGeomClosest(int xpos,
int ypos)
Deprecated. |
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. |
private void |
quicksort(int l,
int r)
Deprecated. |
private SceneGraphPath[] |
sort(SceneGraphPath[] sgpArr)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SHAPE3D
Shape3D
node from
a given SceneGraphPath
.
pickNode(javax.media.j3d.SceneGraphPath, int)
,
Constant Field Valuespublic static final int MORPH
Morph
node from
a given SceneGraphPath
.
pickNode(javax.media.j3d.SceneGraphPath, int)
,
Constant Field Valuespublic static final int PRIMITIVE
Primitive
node
from a given SceneGraphPath
.
pickNode(javax.media.j3d.SceneGraphPath, int)
,
Constant Field Valuespublic static final int LINK
Link
node from
a given SceneGraphPath
.
pickNode(javax.media.j3d.SceneGraphPath, int)
,
Constant Field Valuespublic static final int GROUP
Group
node from
a given SceneGraphPath
.
pickNode(javax.media.j3d.SceneGraphPath, int)
,
Constant Field Valuespublic static final int TRANSFORM_GROUP
TransformGroup
node from a given SceneGraphPath
.
pickNode(javax.media.j3d.SceneGraphPath, int)
,
Constant Field Valuespublic static final int BRANCH_GROUP
BranchGroup
node from a given SceneGraphPath
.
pickNode(javax.media.j3d.SceneGraphPath, int)
,
Constant Field Valuespublic static final int SWITCH
Switch
node from
a given SceneGraphPath
.
pickNode(javax.media.j3d.SceneGraphPath, int)
,
Constant Field Valuespublic static final int USE_GEOMETRY
public static final int USE_BOUNDS
BranchGroup pickRoot
Canvas3D canvas
Point3d origin
Vector3d direction
PickRay pickRay
SceneGraphPath sceneGraphPath
SceneGraphPath[] sceneGraphPathArr
int pickBy
static final boolean debug
private double[] distance
private int[] position
Constructor Detail |
---|
public PickObject(Canvas3D c, BranchGroup root)
c
- Current J3D canvas.root
- The portion of the scenegraph for which picking is to occur
on. It has to be a BranchGroup
.BranchGroup
,
Canvas3D
Method Detail |
---|
public PickShape generatePickRay(int xpos, int ypos)
xpos
- The value along the x-axis.ypos
- The value along the y-axis.
public SceneGraphPath[] pickAll(int xpos, int ypos)
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.
xpos
- The value along the x-axis.ypos
- The value along the y-axis.
null
is returned..SceneGraphPath
public SceneGraphPath[] pickAllSorted(int xpos, int ypos)
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.
xpos
- The value along the x-axis.ypos
- The value along the y-axis.
null
is returned..SceneGraphPath
public SceneGraphPath pickAny(int xpos, int ypos)
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.
xpos
- The value along the x-axis.ypos
- The value along the y-axis.
null
is returned..SceneGraphPath
public SceneGraphPath pickClosest(int xpos, int ypos)
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.
xpos
- The value along the x-axis.ypos
- The value along the y-axis.
null
is returned.SceneGraphPath
public SceneGraphPath[] pickAll(int xpos, int ypos, int flag)
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.
xpos
- The value along the x-axis.ypos
- The value along the y-axis.flag
- Specifys picking by Geometry or Bounds.
null
is returned..SceneGraphPath
public SceneGraphPath[] pickAllSorted(int xpos, int ypos, int flag)
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.
xpos
- The value along the x-axis.ypos
- The value along the y-axis.flag
- Specifys picking by Geometry or Bounds.
null
is returned..SceneGraphPath
public SceneGraphPath pickAny(int xpos, int ypos, int flag)
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.
xpos
- The value along the x-axis.ypos
- The value along the y-axis.flag
- Specifys picking by Geometry or Bounds.
null
is returned..SceneGraphPath
public SceneGraphPath pickClosest(int xpos, int ypos, int flag)
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.
xpos
- The value along the x-axis.ypos
- The value along the y-axis.flag
- Specifys picking by Geometry or Bounds.
null
is returned.SceneGraphPath
private SceneGraphPath[] pickGeomAll(int xpos, int ypos)
private SceneGraphPath[] pickGeomAllSorted(int xpos, int ypos)
private SceneGraphPath pickGeomClosest(int xpos, int ypos)
private SceneGraphPath pickGeomAny(int xpos, int ypos)
private SceneGraphPath[] sort(SceneGraphPath[] sgpArr)
private final void quicksort(int l, int r)
public Node pickNode(SceneGraphPath sgPath, int flags)
sgPath
- the SceneGraphPath to be traversed.flags
- the Node types interested in picking.
null
is returned.public Node pickNode(SceneGraphPath sgPath, int flags, int occurrence)
occurrence
of a Node that is of the specified type.
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).
occurrence
of a Node
of type flags
, starting from the Locale. If no pickable object is
found, null
is returned.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |