| java.lang.Object javax.media.j3d.Locale
All known Subclasses: org.jdesktop.j3dfly.utils.developmenttools.DevelopmentLocale,
Locale | public class Locale extends Object (Code) | | 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.
For more information, see the
Introduction to the Java 3D API and
Scene Graph Superstructure
documents.
See Also: VirtualUniverse See Also: HiResCoord See Also: BranchGroup |
Constructor Summary | |
public | Locale(VirtualUniverse universe) Constructs and initializes a new high resolution Locale object
located at (0, 0, 0). | public | Locale(VirtualUniverse universe, int[] x, int[] y, int[] z) Constructs and initializes a new high resolution Locale object
from the parameters provided. | public | Locale(VirtualUniverse universe, HiResCoord hiRes) Constructs and initializes a new high resolution Locale object
at the location specified by the HiResCoord argument. |
Method Summary | |
public void | addBranchGraph(BranchGroup branchGroup) Add a new branch graph rooted at BranchGroup to
the list of branch graphs. | void | doAddBranchGraph(BranchGroup branchGroup) | void | doRemoveBranchGraph(BranchGroup branchGroup, J3dMessage messages, int startIndex) | void | doReplaceBranchGraph(BranchGroup oldGroup, BranchGroup newGroup) | public Enumeration | getAllBranchGraphs() Gets an Enumeration object of all branch graphs in this Locale. | public void | getHiRes(HiResCoord hiRes) Returns this node's HiResCoord. | public VirtualUniverse | getVirtualUniverse() Retrieves the virtual universe within which this Locale object
is contained. | public int | numBranchGraphs() Get number of branch graphs in this Locale. | public SceneGraphPath[] | pickAll(PickShape pickShape) Returns an array referencing all the items that are pickable below this
Locale that intersect with PickShape. | public PickInfo[] | pickAll(int mode, int flags, PickShape pickShape) Returns an array unsorted references to all the PickInfo objects that are pickable
below this Locale that intersect with PickShape. | public SceneGraphPath[] | pickAllSorted(PickShape pickShape) Returns a sorted array of references to all the pickable items
that intersect with the pickShape. | public PickInfo[] | pickAllSorted(int mode, int flags, PickShape pickShape) Returns a sorted array of PickInfo references to all the pickable
items that intersect with the pickShape. | public SceneGraphPath | pickAny(PickShape pickShape) Returns a reference to any item that is Pickable below this
Locale which intersects with pickShape . | public PickInfo | pickAny(int mode, int flags, PickShape pickShape) Returns a PickInfo which references the pickable item below this
Locale which intersects with pickShape .
The accuracy of the pick is set by the pick mode. | public SceneGraphPath | pickClosest(PickShape pickShape) Returns a SceneGraphPath which references the pickable item
which is closest to the origin of pickShape . | public PickInfo | pickClosest(int mode, int flags, PickShape pickShape) Returns a PickInfo which references the pickable item
which is closest to the origin of pickShape .
The accuracy of the pick is set by the pick mode. | public void | removeBranchGraph(BranchGroup branchGroup) Removes a branch graph rooted at BranchGroup from
the list of branch graphs. | void | removeFromUniverse() | public 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. | public void | setHiRes(int[] x, int[] y, int[] z) Sets the HiRes coordinate of this Locale to the location
specified by the parameters provided. | public void | setHiRes(HiResCoord hiRes) Sets the HiRes coordinate of this Locale
to the location specified by the HiRes argument. | void | validateModeFlagAndPickShape(int mode, int flags, PickShape pickShape) |
branchGroups | Vector branchGroups(Code) | | List of BranchGroup objects included in this Locale
|
hiRes | HiResCoord hiRes(Code) | | The high resolution coordinate associated with this Locale object.
|
universe | VirtualUniverse universe(Code) | | The virtual universe that this Locale object is contained within.
|
Locale | public Locale(VirtualUniverse universe)(Code) | | Constructs and initializes a new high resolution Locale object
located at (0, 0, 0).
Parameters: universe - the virtual universe that will contain thisLocale object |
Locale | public Locale(VirtualUniverse universe, int[] x, int[] y, int[] z)(Code) | | Constructs and initializes a new high resolution Locale object
from the parameters provided.
Parameters: universe - the virtual universe that will contain thisLocale object Parameters: x - an eight element array specifying the x position Parameters: y - an eight element array specifying the y position Parameters: z - an eight element array specifying the z position |
Locale | public Locale(VirtualUniverse universe, HiResCoord hiRes)(Code) | | 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 thisLocale object Parameters: hiRes - the HiRes coordinate to use in creating this Locale |
addBranchGraph | public void addBranchGraph(BranchGroup branchGroup)(Code) | | Add a new branch graph rooted at BranchGroup to
the list of branch graphs.
Parameters: branchGroup - root of the branch graph to be added exception: IllegalStateException - if this Locale has beenremoved from its VirtualUniverse. exception: MultipleParentException - if the specified BranchGroup nodeis already live. |
getAllBranchGraphs | public Enumeration getAllBranchGraphs()(Code) | | Gets an Enumeration object of all branch graphs in this Locale.
an Enumeration object of all branch graphs. exception: IllegalStateException - if this Locale has beenremoved from its VirtualUniverse. |
getHiRes | public void getHiRes(HiResCoord hiRes)(Code) | | Returns this node's HiResCoord.
Parameters: hiRes - a HiResCoord object that will receive theHiRes coordinate of this Locale node |
getVirtualUniverse | public VirtualUniverse getVirtualUniverse()(Code) | | Retrieves the virtual universe within which this Locale object
is contained. A null reference indicates that this
Locale has been removed from its VirtualUniverse.
the virtual universe within which this Locale objectis contained. |
numBranchGraphs | public int numBranchGraphs()(Code) | | Get number of branch graphs in this Locale.
number of branch graphs in this Locale. |
pickAll | public SceneGraphPath[] pickAll(PickShape pickShape)(Code) | | Returns an array referencing all the items that are pickable below this
Locale that intersect with PickShape.
The resultant array is unordered.
Parameters: pickShape - the description of this picking volume or area. exception: IllegalStateException - if this Locale has beenremoved from its VirtualUniverse. See Also: BranchGroup.pickAll |
pickAll | public PickInfo[] pickAll(int mode, int flags, PickShape pickShape)(Code) | | Returns an array unsorted references to all the PickInfo objects that are pickable
below this Locale that intersect with PickShape.
The accuracy of the pick is set by the pick mode. The mode include :
PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
is specified via a masked variable, flags, indicating which components are
present in each returned PickInfo object.
Parameters: mode - picking mode, one of PickInfo.PICK_BOUNDS or PickInfo.PICK_GEOMETRY . Parameters: flags - a mask indicating which components are present in each PickInfo object. This is specified as one or more individual bits that are bitwise "OR"ed together to describe the PickInfo data. The flags include :PickInfo.SCENEGRAPHPATH - request for computed SceneGraphPath. PickInfo.NODE - request for computed intersected Node.
PickInfo.LOCAL_TO_VWORLD - request for computed local to virtual world transform.
PickInfo.CLOSEST_INTERSECTION_POINT - request for closest intersection point.
PickInfo.CLOSEST_DISTANCE - request for the distance of closest intersection.
PickInfo.CLOSEST_GEOM_INFO - request for only the closest intersection geometry information.
PickInfo.ALL_GEOM_INFO - request for all intersection geometry information.
Parameters: pickShape - the description of this picking volume or area. exception: IllegalArgumentException - if flags contains both CLOSEST_GEOM_INFO and ALL_GEOM_INFO. exception: IllegalArgumentException - if pickShape is a PickPoint and pick modeis set to PICK_GEOMETRY. exception: IllegalArgumentException - if pick mode is neither PICK_BOUNDS nor PICK_GEOMETRY. exception: IllegalArgumentException - if pick mode is PICK_BOUNDS and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,CLOSEST_GEOM_INFO or ALL_GEOM_INFO. exception: IllegalArgumentException - if pickShape is PickBounds and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,CLOSEST_GEOM_INFO or ALL_GEOM_INFO. exception: IllegalStateException - if this Locale has beenremoved from its VirtualUniverse. exception: CapabilityNotSetException - if the mode isPICK_GEOMETRY and the Geometry.ALLOW_INTERSECT capability bitis not set in any Geometry objects referred to by any shapenode whose bounds intersects the PickShape. exception: CapabilityNotSetException - if flags contains any ofCLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE, CLOSEST_GEOM_INFOor ALL_GEOM_INFO, and the capability bits that control reading ofcoordinate data are not set in any GeometryArray object referredto by any shape node that intersects the PickShape.The capability bits that must be set to avoid this exception are as follows : - By-copy geometry : GeometryArray.ALLOW_COORDINATE_READ
- By-reference geometry : GeometryArray.ALLOW_REF_DATA_READ
- Indexed geometry : IndexedGeometryArray.ALLOW_COORDINATE_INDEX_READ(in addition to one of the above)
See Also: BranchGroup.pickAll(intintjavax.media.j3d.PickShape) See Also: PickInfo since: Java 3D 1.4 |
pickAllSorted | public SceneGraphPath[] pickAllSorted(PickShape pickShape)(Code) | | 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 resulting array
is unordered.
Parameters: pickShape - the description of this picking volume or area. exception: IllegalStateException - if this Locale has beenremoved from its VirtualUniverse. See Also: BranchGroup.pickAllSorted |
pickAllSorted | public PickInfo[] pickAllSorted(int mode, int flags, PickShape pickShape)(Code) | | Returns a sorted array of PickInfo 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
The accuracy of the pick is set by the pick mode. The mode include :
PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
is specified via a masked variable, flags, indicating which components are
present in each returned PickInfo object.
Parameters: mode - picking mode, one of PickInfo.PICK_BOUNDS or PickInfo.PICK_GEOMETRY . Parameters: flags - a mask indicating which components are present in each PickInfo object. This is specified as one or more individual bits that are bitwise "OR"ed together to describe the PickInfo data. The flags include :PickInfo.SCENEGRAPHPATH - request for computed SceneGraphPath. PickInfo.NODE - request for computed intersected Node.
PickInfo.LOCAL_TO_VWORLD - request for computed local to virtual world transform.
PickInfo.CLOSEST_INTERSECTION_POINT - request for closest intersection point.
PickInfo.CLOSEST_DISTANCE - request for the distance of closest intersection.
PickInfo.CLOSEST_GEOM_INFO - request for only the closest intersection geometry information.
PickInfo.ALL_GEOM_INFO - request for all intersection geometry information.
Parameters: pickShape - the description of this picking volume or area. exception: IllegalArgumentException - if flags contains both CLOSEST_GEOM_INFO and ALL_GEOM_INFO. exception: IllegalArgumentException - if pickShape is a PickPoint and pick modeis set to PICK_GEOMETRY. exception: IllegalArgumentException - if pick mode is neither PICK_BOUNDS nor PICK_GEOMETRY. exception: IllegalArgumentException - if pick mode is PICK_BOUNDS and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,CLOSEST_GEOM_INFO or ALL_GEOM_INFO. exception: IllegalArgumentException - if pickShape is PickBounds and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,CLOSEST_GEOM_INFO or ALL_GEOM_INFO. exception: IllegalStateException - if this Locale has beenremoved from its VirtualUniverse. exception: CapabilityNotSetException - if the mode isPICK_GEOMETRY and the Geometry.ALLOW_INTERSECT capability bitis not set in any Geometry objects referred to by any shapenode whose bounds intersects the PickShape. exception: CapabilityNotSetException - if flags contains any ofCLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE, CLOSEST_GEOM_INFOor ALL_GEOM_INFO, and the capability bits that control reading ofcoordinate data are not set in any GeometryArray object referredto by any shape node that intersects the PickShape.The capability bits that must be set to avoid this exception are as follows : - By-copy geometry : GeometryArray.ALLOW_COORDINATE_READ
- By-reference geometry : GeometryArray.ALLOW_REF_DATA_READ
- Indexed geometry : IndexedGeometryArray.ALLOW_COORDINATE_INDEX_READ(in addition to one of the above)
See Also: BranchGroup.pickAllSorted(intintjavax.media.j3d.PickShape) See Also: PickInfo since: Java 3D 1.4 |
pickAny | public SceneGraphPath pickAny(PickShape pickShape)(Code) | | Returns a reference to any item that is Pickable below this
Locale which intersects with pickShape .
Parameters: pickShape - the description of this picking volume or area. exception: IllegalStateException - if this Locale has beenremoved from its VirtualUniverse. See Also: BranchGroup.pickAny |
pickAny | public PickInfo pickAny(int mode, int flags, PickShape pickShape)(Code) | | Returns a PickInfo which references the pickable item below this
Locale which intersects with pickShape .
The accuracy of the pick is set by the pick mode. The mode include :
PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
is specified via a masked variable, flags, indicating which components are
present in each returned PickInfo object.
Parameters: mode - picking mode, one of PickInfo.PICK_BOUNDS or PickInfo.PICK_GEOMETRY . Parameters: flags - a mask indicating which components are present in each PickInfo object. This is specified as one or more individual bits that are bitwise "OR"ed together to describe the PickInfo data. The flags include :PickInfo.SCENEGRAPHPATH - request for computed SceneGraphPath. PickInfo.NODE - request for computed intersected Node.
PickInfo.LOCAL_TO_VWORLD - request for computed local to virtual world transform.
PickInfo.CLOSEST_INTERSECTION_POINT - request for closest intersection point.
PickInfo.CLOSEST_DISTANCE - request for the distance of closest intersection.
PickInfo.CLOSEST_GEOM_INFO - request for only the closest intersection geometry information.
PickInfo.ALL_GEOM_INFO - request for all intersection geometry information.
Parameters: pickShape - the description of this picking volume or area. exception: IllegalArgumentException - if flags contains both CLOSEST_GEOM_INFO and ALL_GEOM_INFO. exception: IllegalArgumentException - if pickShape is a PickPoint and pick modeis set to PICK_GEOMETRY. exception: IllegalArgumentException - if pick mode is neither PICK_BOUNDS nor PICK_GEOMETRY. exception: IllegalArgumentException - if pick mode is PICK_BOUNDS and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,CLOSEST_GEOM_INFO or ALL_GEOM_INFO. exception: IllegalArgumentException - if pickShape is PickBounds and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,CLOSEST_GEOM_INFO or ALL_GEOM_INFO. exception: IllegalStateException - if this Locale has beenremoved from its VirtualUniverse. exception: CapabilityNotSetException - if the mode isPICK_GEOMETRY and the Geometry.ALLOW_INTERSECT capability bitis not set in any Geometry objects referred to by any shapenode whose bounds intersects the PickShape. exception: CapabilityNotSetException - if flags contains any ofCLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE, CLOSEST_GEOM_INFOor ALL_GEOM_INFO, and the capability bits that control reading ofcoordinate data are not set in any GeometryArray object referredto by any shape node that intersects the PickShape.The capability bits that must be set to avoid this exception are as follows : - By-copy geometry : GeometryArray.ALLOW_COORDINATE_READ
- By-reference geometry : GeometryArray.ALLOW_REF_DATA_READ
- Indexed geometry : IndexedGeometryArray.ALLOW_COORDINATE_INDEX_READ(in addition to one of the above)
See Also: BranchGroup.pickAny(intintjavax.media.j3d.PickShape) See Also: PickInfo since: Java 3D 1.4 |
pickClosest | public SceneGraphPath pickClosest(PickShape pickShape)(Code) | | 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.
Parameters: pickShape - the description of this picking volume or area. exception: IllegalStateException - if this Locale has beenremoved from its VirtualUniverse. See Also: BranchGroup.pickClosest |
pickClosest | public PickInfo pickClosest(int mode, int flags, PickShape pickShape)(Code) | | Returns a PickInfo which references the pickable item
which is closest to the origin of pickShape .
The accuracy of the pick is set by the pick mode. The mode include :
PickInfo.PICK_BOUNDS and PickInfo.PICK_GEOMETRY. The amount of information returned
is specified via a masked variable, flags, indicating which components are
present in each returned PickInfo object.
Parameters: mode - picking mode, one of PickInfo.PICK_BOUNDS or PickInfo.PICK_GEOMETRY . Parameters: flags - a mask indicating which components are present in each PickInfo object. This is specified as one or more individual bits that are bitwise "OR"ed together to describe the PickInfo data. The flags include :PickInfo.SCENEGRAPHPATH - request for computed SceneGraphPath. PickInfo.NODE - request for computed intersected Node.
PickInfo.LOCAL_TO_VWORLD - request for computed local to virtual world transform.
PickInfo.CLOSEST_INTERSECTION_POINT - request for closest intersection point.
PickInfo.CLOSEST_DISTANCE - request for the distance of closest intersection.
PickInfo.CLOSEST_GEOM_INFO - request for only the closest intersection geometry information.
PickInfo.ALL_GEOM_INFO - request for all intersection geometry information.
Parameters: pickShape - the description of this picking volume or area. exception: IllegalArgumentException - if flags contains both CLOSEST_GEOM_INFO and ALL_GEOM_INFO. exception: IllegalArgumentException - if pickShape is a PickPoint and pick modeis set to PICK_GEOMETRY. exception: IllegalArgumentException - if pick mode is neither PICK_BOUNDS nor PICK_GEOMETRY. exception: IllegalArgumentException - if pick mode is PICK_BOUNDS and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,CLOSEST_GEOM_INFO or ALL_GEOM_INFO. exception: IllegalArgumentException - if pickShape is PickBounds and flags includes any of CLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE,CLOSEST_GEOM_INFO or ALL_GEOM_INFO. exception: IllegalStateException - if this Locale has beenremoved from its VirtualUniverse. exception: CapabilityNotSetException - if the mode isPICK_GEOMETRY and the Geometry.ALLOW_INTERSECT capability bitis not set in any Geometry objects referred to by any shapenode whose bounds intersects the PickShape. exception: CapabilityNotSetException - if flags contains any ofCLOSEST_INTERSECTION_POINT, CLOSEST_DISTANCE, CLOSEST_GEOM_INFOor ALL_GEOM_INFO, and the capability bits that control reading ofcoordinate data are not set in any GeometryArray object referredto by any shape node that intersects the PickShape.The capability bits that must be set to avoid this exception are as follows : - By-copy geometry : GeometryArray.ALLOW_COORDINATE_READ
- By-reference geometry : GeometryArray.ALLOW_REF_DATA_READ
- Indexed geometry : IndexedGeometryArray.ALLOW_COORDINATE_INDEX_READ(in addition to one of the above)
See Also: BranchGroup.pickClosest(intintjavax.media.j3d.PickShape) See Also: PickInfo since: Java 3D 1.4 |
removeBranchGraph | public void removeBranchGraph(BranchGroup branchGroup)(Code) | | Removes a branch graph rooted at BranchGroup from
the list of branch graphs.
Parameters: branchGroup - root of the branch graph to be removed exception: IllegalStateException - if this Locale has beenremoved from its VirtualUniverse. exception: CapabilityNotSetException - if the ALLOW_DETACH capability isnot set in the specified BranchGroup node. |
removeFromUniverse | void removeFromUniverse()(Code) | | |
replaceBranchGraph | public void replaceBranchGraph(BranchGroup oldGroup, BranchGroup newGroup)(Code) | | Replaces the branch graph rooted at oldGroup in the list of
branch graphs with the branch graph rooted at
newGroup.
Parameters: oldGroup - root of the branch graph to be replaced. Parameters: newGroup - root of the branch graph that will replace the oldbranch graph. exception: IllegalStateException - if this Locale has beenremoved from its VirtualUniverse. exception: CapabilityNotSetException - if the ALLOW_DETACH capability isnot set in the old BranchGroup node. exception: MultipleParentException - if the new BranchGroup nodeis already live. |
setHiRes | public void setHiRes(int[] x, int[] y, int[] z)(Code) | | 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 Parameters: y - an eight element array specifying the y position Parameters: z - an eight element array specifying the z position |
setHiRes | public void setHiRes(HiResCoord hiRes)(Code) | | 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 |
validateModeFlagAndPickShape | void validateModeFlagAndPickShape(int mode, int flags, PickShape pickShape)(Code) | | |
|
|