|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.j3d.Locale
A Locale object defines a high-resolution position within a VirtualUniverse, and serves as a container for a collection of BranchGroup-rooted subgraphs (branch graphs), at that position. Objects within a Locale are defined using standard double-precision coordinates, relative to the origin of the Locale. This origin defines the Virtual World coordinate system for that Locale.
A Locale object defines methods to set and get its high-resolution coordinates, and methods to add, remove, and enumerate the branch graphs.
VirtualUniverse
,
HiResCoord
,
BranchGroup
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()
Cleans up resources associated with this Locale |
java.util.Enumeration |
getAllBranchGraphs()
Gets an Enumeration object of all branch graphs in this Locale. |
void |
getHiRes(HiResCoord hiRes)
Returns this node's HiResCoord. |
VirtualUniverse |
getVirtualUniverse()
Retrieves the virtual universe within which this Locale object is contained. |
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)
Replaces the branch graph rooted at oldGroup in the list of branch graphs with 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 |
public Locale(VirtualUniverse universe)
universe
- the virtual universe that will contain this
Locale objectpublic Locale(VirtualUniverse universe, int[] x, int[] y, int[] z)
universe
- the virtual universe that will contain this
Locale objectx
- an eight element array specifying the x positiony
- an eight element array specifying the y positionz
- an eight element array specifying the z positionpublic Locale(VirtualUniverse universe, HiResCoord hiRes)
universe
- the virtual universe that will contain this
Locale objecthiRes
- the HiRes coordinate to use in creating this LocaleMethod Detail |
public VirtualUniverse getVirtualUniverse()
public void setHiRes(int[] x, int[] y, int[] z)
x
- an eight element array specifying the x positiony
- an eight element array specifying the y positionz
- an eight element array specifying the z positionpublic void setHiRes(HiResCoord hiRes)
hiRes
- the HiRes coordinate specifying this node's new locationpublic void getHiRes(HiResCoord hiRes)
hiRes
- a HiResCoord object that will receive the
HiRes coordinate of this Locale nodepublic void addBranchGraph(BranchGroup branchGroup)
branchGroup
- root of the branch graph to be added
java.lang.IllegalStateException
- if this Locale has been
removed from its VirtualUniverse.
MultipleParentException
- if the specified BranchGroup node
is already live.public void removeBranchGraph(BranchGroup branchGroup)
branchGroup
- root of the branch graph to be removed
java.lang.IllegalStateException
- if this Locale has been
removed from its VirtualUniverse.
CapabilityNotSetException
- if the ALLOW_DETACH capability is
not set in the specified BranchGroup node.public void replaceBranchGraph(BranchGroup oldGroup, BranchGroup newGroup)
oldGroup
- root of the branch graph to be replaced.newGroup
- root of the branch graph that will replace the old
branch graph.
java.lang.IllegalStateException
- if this Locale has been
removed from its VirtualUniverse.
CapabilityNotSetException
- if the ALLOW_DETACH capability is
not set in the old BranchGroup node.
MultipleParentException
- if the new BranchGroup node
is already live.public int numBranchGraphs()
public java.util.Enumeration getAllBranchGraphs()
java.lang.IllegalStateException
- if this Locale has been
removed from its VirtualUniverse.public SceneGraphPath[] pickAll(PickShape pickShape)
Locale
that intersect with PickShape.
The resultant array is unordered.
pickShape
- the description of this picking volume or area.
java.lang.IllegalStateException
- if this Locale has been
removed from its VirtualUniverse.BranchGroup.pickAll(javax.media.j3d.PickShape)
public SceneGraphPath[] pickAllSorted(PickShape pickShape)
pickShape
- the description of this picking volume or area.
java.lang.IllegalStateException
- if this Locale has been
removed from its VirtualUniverse.BranchGroup.pickAllSorted(javax.media.j3d.PickShape)
public SceneGraphPath pickClosest(PickShape pickShape)
pickShape
.
pickShape
- the description of this picking volume or area.
java.lang.IllegalStateException
- if this Locale has been
removed from its VirtualUniverse.BranchGroup.pickClosest(javax.media.j3d.PickShape)
public SceneGraphPath pickAny(PickShape pickShape)
pickShape
.
pickShape
- the description of this picking volume or area.
java.lang.IllegalStateException
- if this Locale has been
removed from its VirtualUniverse.BranchGroup.pickAny(javax.media.j3d.PickShape)
protected void finalize()
finalize
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |