javax.media.j3d
Class Locale

java.lang.Object
  |
  +--javax.media.j3d.Locale

public class Locale
extends java.lang.Object


Constructor Summary
Locale(VirtualUniverse universe)
          Constructs and initializes a new high resolution Locale object located at (0, 0, 0).
Locale(VirtualUniverse universe, HiResCoord hiRes)
          Constructs and initializes a new high resolution Locale object at the location specified by the HiResCoord argument.
Locale(VirtualUniverse universe, int[] x, int[] y, int[] z)
          Constructs and initializes a new high resolution Locale object from the parameters provided.
 
Method Summary
 void addBranchGraph(BranchGroup branchGroup)
          Add a new branch graph rooted at BranchGroup to the list of branch graphs.
protected  void finalize()
           
 java.util.Enumeration getAllBranchGraphs()
          Get an Enumeration object of list of all branch graphs
 void getHiRes(HiResCoord hiRes)
          Returns this node's HiResCoord.
 VirtualUniverse getVirtualUniverse()
          Retrieves the virtual universe that this Locale object is contained within.
 int numBranchGraphs()
          Get number of branch graphs in this Locale.
 SceneGraphPath[] pickAll(PickShape pickShape)
          Returns an array referencing all the items that are pickable below this Locale that intersect with PickShape.
 SceneGraphPath[] pickAllSorted(PickShape pickShape)
          Returns a sorted array of references to all the Pickable items that intersect with the pickShape.
 SceneGraphPath pickAny(PickShape pickShape)
          Returns a reference to any item that is Pickable below this Locale which intersects with pickShape.
 SceneGraphPath pickClosest(PickShape pickShape)
          Returns a SceneGraphPath which references the pickable item which is closest to the origin of pickShape.
 void removeBranchGraph(BranchGroup branchGroup)
          Removes a branch graph rooted at BranchGroup from the list of branch graphs.
 void replaceBranchGraph(BranchGroup oldGroup, BranchGroup newGroup)
          Search for the branch graph rooted at oldGroup in the list of branch graphs and replace it the branch graph rooted at newGroup.
 void setHiRes(HiResCoord hiRes)
          Sets the HiRes coordinate of this Locale to the location specified by the HiRes argument.
 void setHiRes(int[] x, int[] y, int[] z)
          Sets the HiRes coordinate of this Locale to the location specified by the parameters provided.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Locale

public Locale(VirtualUniverse universe)
Constructs and initializes a new high resolution Locale object located at (0, 0, 0).
Parameters:
universe - the virtual universe that will contain this Locale object

Locale

public Locale(VirtualUniverse universe,
              int[] x,
              int[] y,
              int[] z)
Constructs and initializes a new high resolution Locale object from the parameters provided.
Parameters:
universe - the virtual universe that will contain this Locale object
x - an eight element array specifying the x position
y - an eight element array specifying the y position
z - an eight element array specifying the z position

Locale

public Locale(VirtualUniverse universe,
              HiResCoord hiRes)
Constructs and initializes a new high resolution Locale object at the location specified by the HiResCoord argument.
Parameters:
universe - the virtual universe that will contain this Locale object
hiRes - the HiRes coordinate to use in creating this Locale
Method Detail

getVirtualUniverse

public VirtualUniverse getVirtualUniverse()
Retrieves the virtual universe that this Locale object is contained within.
Returns:
the virtual universe that this Locale object is contained within

setHiRes

public void setHiRes(int[] x,
                     int[] y,
                     int[] z)
Sets the HiRes coordinate of this Locale to the location specified by the parameters provided.
Parameters:
x - an eight element array specifying the x position
y - an eight element array specifying the y position
z - an eight element array specifying the z position

setHiRes

public void setHiRes(HiResCoord hiRes)
Sets the HiRes coordinate of this Locale to the location specified by the HiRes argument.
Parameters:
hiRes - the HiRes coordinate specifying this node's new location

getHiRes

public void getHiRes(HiResCoord hiRes)
Returns this node's HiResCoord.
Parameters:
hiRes - a HiResCoord object that will receive the HiRes coordinate of this Locale node

addBranchGraph

public void addBranchGraph(BranchGroup branchGroup)
Add a new branch graph rooted at BranchGroup to the list of branch graphs.
Parameters:
branchGroup - root of the branch graph to be added

removeBranchGraph

public void removeBranchGraph(BranchGroup branchGroup)
Removes a branch graph rooted at BranchGroup from the list of branch graphs.
Parameters:
branchGroup - root of the branch graph to be removed

replaceBranchGraph

public void replaceBranchGraph(BranchGroup oldGroup,
                               BranchGroup newGroup)
Search for the branch graph rooted at oldGroup in the list of branch graphs and replace it the branch graph rooted at newGroup.
Parameters:
oldGroup - root of the branch graph to be replaced
newGroup - root of the branch graph to be replaced with

numBranchGraphs

public int numBranchGraphs()
Get number of branch graphs in this Locale.
Returns:
number of branch graphs in this Locale.

getAllBranchGraphs

public java.util.Enumeration getAllBranchGraphs()
Get an Enumeration object of list of all branch graphs
Returns:
an Enumeration object of all branch graphs.

pickAll

public final SceneGraphPath[] pickAll(PickShape pickShape)
Returns an array referencing all the items that are pickable below this Locale that intersect with PickShape. The resultant array is unordered.
Parameters:
origin - The origin of the ray
direction - the direction of the ray
See Also:
SceneGraphPath, pickAll(javax.media.j3d.PickShape)

pickAllSorted

public final SceneGraphPath[] pickAllSorted(PickShape pickShape)
Returns a sorted array of references to all the Pickable items that intersect with the pickShape. Element [0] references the item closest to origin of PickShape successive array elements are further from the origin Note: If pickShape is of type PickBounds, the resultance array is unordered.
See Also:
SceneGraphPath, pickAllSorted(javax.media.j3d.PickShape), PickShape

pickClosest

public final SceneGraphPath pickClosest(PickShape pickShape)
Returns a SceneGraphPath which references the pickable item which is closest to the origin of pickShape. Note: If pickShape is of type PickBounds, the return is any pickable node below this Locale.
See Also:
SceneGraphPath, pickClosest(javax.media.j3d.PickShape), PickShape

pickAny

public final SceneGraphPath pickAny(PickShape pickShape)
Returns a reference to any item that is Pickable below this Locale which intersects with pickShape.
See Also:
SceneGraphPath, pickAny(javax.media.j3d.PickShape), PickShape

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object