All Packages Class Hierarchy This Package Previous Next Index
Class javax.media.j3d.SceneGraphPath
java.lang.Object
|
+----javax.media.j3d.SceneGraphPath
- public class SceneGraphPath
- extends Object
A SceneGraphPath object represents a path from an object to a BranchGroup
or Locale. During Picking and Intersect tests the user specifies the
subtree of the scene graph that should be tested. The whole tree for a
locale is searched by providing the locale to the Pick/Intersect tests.
The SceneGraphPath object represents all the components in the subgraph
which have the capability ENABLE_PICK_REPORTING set between the root
of the subtree and the Picked/Intersected object.
ENABLE_PICK_REPORTING is disabled by default.
- See Also:
- ENABLE_PICK_REPORTING, pickAll, pickAllSorted, pickClosest, pickAny
-
SceneGraphPath()
- Constructs a new SceneGraphPath object.
-
SceneGraphPath(Locale, Node)
- Constructs a new SceneGraphPath object.
-
SceneGraphPath(Locale, Node[], Node)
- Constructs a new SceneGraphPath object.
-
equals(SceneGraphPath)
- Returns true if all of the data members of path testPath are
equal to the corresponding data members in this SceneGraphPath.
-
getLocale()
- Retrieves the path's Locale
-
getNode(int)
- Returns the node associated with the specified index.
-
getObject()
- Retrieves the path's object.
-
hashCode()
- Returns a hash number based on the data values in this
object.
-
nodeCount()
- Returns the number of nodes in this path.
-
set(SceneGraphPath)
- Sets this path's values to that of the specified path
-
setLocale(Locale)
- Sets this path's locale to the specified locale.
-
setNode(int, Node)
- Replaces the node with the specified index with newNode.
-
setNodes(Node[])
- Sets this path's node object to those specified object.
-
setObject(Node)
- Sets this path's object to the specified object.
-
toString()
- Returns a string representation of this object
The string contains the class names of all Nodes in the SceneGraphPath
SceneGraphPath
public SceneGraphPath()
- Constructs a new SceneGraphPath object.
SceneGraphPath
public SceneGraphPath(Locale root,
Node object)
- Constructs a new SceneGraphPath object.
- Parameters:
- root - the path's initial Locale object
- object - the object in question
- Throws: IllegalArgumentException
- if object is other than a Group,
Shape3D, or Morph node.
SceneGraphPath
public SceneGraphPath(Locale root,
Node nodes[],
Node object)
- Constructs a new SceneGraphPath object.
- Parameters:
- root - the path's initial Locale object
- nodes - an array of node objects consisting of all
nodes seprating the locale from the object in question
(node[0] is the node closest to the object, while
node[node.length] is the node closest to subtree root or locale)
- object - the object in question.
- Throws: IllegalArgumentException
- if object is other than a Group,
Shape3D, or Morph node.
set
public final void set(SceneGraphPath newPath)
- Sets this path's values to that of the specified path
- Parameters:
- newPath - the SceneGraphPath to copy
setLocale
public final void setLocale(Locale newLocale)
- Sets this path's locale to the specified locale.
- Parameters:
- newLocale - The new locale
setObject
public final void setObject(Node object)
- Sets this path's object to the specified object.
- Parameters:
- object - the new object
- Throws: IllegalArgumentException
- if object is other than a Group,
Shape3D, or Morph node.
setNodes
public final void setNodes(Node nodes[])
- Sets this path's node object to those specified object.
- Parameters:
- nodes - the new nodes
setNode
public final void setNode(int index,
Node newNode)
- Replaces the node with the specified index with newNode.
- Parameters:
- index - the index of the node to replace
- newNode - the new node
getLocale
public final Locale getLocale()
- Retrieves the path's Locale
- Returns:
- this path's Locale
getObject
public final Node getObject()
- Retrieves the path's object.
- Returns:
- the path's object
nodeCount
public final int nodeCount()
- Returns the number of nodes in this path.
- Returns:
- a count of the number of nodes in this path
getNode
public final Node getNode(int index)
- Returns the node associated with the specified index.
- Parameters:
- index - the index specifying which node to retrieve
- Returns:
- the specified object.
equals
public boolean equals(SceneGraphPath testPath)
- Returns true if all of the data members of path testPath are
equal to the corresponding data members in this SceneGraphPath.
- Parameters:
- testPath - the path we will compare this object's path against.
- Returns:
- true or false
hashCode
public int hashCode()
- Returns a hash number based on the data values in this
object. Two different SceneGraphPath objects with identical data
values (ie, returns true for trans.equals(SceneGraphPath) ) will
return the same hash number. Two Paths with different data members
may return the same hash value, although this is not likely.
- Returns:
- the integer hash value
- Overrides:
- hashCode in class Object
toString
public String toString()
- Returns a string representation of this object
The string contains the class names of all Nodes in the SceneGraphPath
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index