| java.lang.Object javax.media.j3d.SceneGraphObject javax.media.j3d.Node javax.media.j3d.Group javax.media.j3d.BranchGroup
All known Subclasses: org.jdesktop.j3dedit.scenegrapheditor.nodes.LoaderGroup, org.jdesktop.j3dfly.utils.environment.J3dSky, org.jdesktop.j3dfly.utils.vpbehaviors.vehicles.SimpleVehicle, com.sun.j3d.utils.universe.PlatformGeometry, org.jdesktop.j3dedit.scenegrapheditor.visualtools.PointHighlightControl, org.jdesktop.j3dfly.utils.behaviors.KBSplineFromFileBG, org.jdesktop.j3d.utils.scenegraph.transparency.TransparencyOrderController, com.sun.j3d.utils.universe.ViewerAvatar, org.jdesktop.j3d.apps.sound.SoundBranchGroup, org.jdesktop.j3d.loaders.vrml97.impl.RGroup, com.sun.j3d.utils.universe.ViewingPlatform, org.jdesktop.j3dedit.scenegrapheditor.VisualToolManager, org.jdesktop.j3dedit.scenegrapheditor.visualtools.InterpolatorPathView, org.jdesktop.j3dedit.scenegrapheditor.visualtools.VisualTool,
BranchGroup | public class BranchGroup extends Group (Code) | | The BranchGroup serves as a pointer to the root of a
scene graph branch; BranchGroup objects are the only objects that
can be inserted into a Locale's set of objects. A subgraph, rooted
by a BranchGroup node can be thought of as a compile unit. The
following things may be done with BranchGroup:
- A BranchGroup may be compiled by calling its compile method. This causes the
entire subgraph to be compiled. If any BranchGroup nodes are contained within the
subgraph, they are compiled as well (along with their descendants).
- A BranchGroup may be inserted into a virtual universe by attaching it to a
Locale. The entire subgraph is then said to be live.
- A BranchGroup that is contained within another subgraph may be reparented or
detached at run time if the appropriate capabilities are set.
Note that that if a BranchGroup is included in another subgraph, as a child of
some other group node, it may not be attached to a Locale.
|
Field Summary | |
final public static int | ALLOW_DETACH For BranchGroup nodes, specifies that this BranchGroup allows detaching
from its parent. |
Constructor Summary | |
public | BranchGroup() Constructs and initializes a new BranchGroup node object. |
Method Summary | |
public Node | cloneNode(boolean forceDuplicate) Creates a new instance of the node. | public void | compile() Compiles the source BranchGroup associated with this object and
creates and caches a compiled scene graph. | void | createRetained() Creates the retained mode BranchGroupRetained object that this
BranchGroup component object will point to. | public void | detach() Detaches this BranchGroup from its parent. | public SceneGraphPath[] | pickAll(PickShape pickShape) Returns an array referencing all the items that are pickable below this
BranchGroup 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 BranchGroup that intersect with PickShape.
The accuracy of the pick is set by the pick mode. | 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 BranchGroup that
intersects with pickShape . | public PickInfo | pickAny(int mode, int flags, PickShape pickShape) Returns a PickInfo which references the pickable item below this
BranchGroup that intersects with pickShape .
The accuracy of the pick is set by the pick mode. | public SceneGraphPath | pickClosest(PickShape pickShape) Returns a SceneGraphPath that references the pickable item
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. | void | validateModeFlagAndPickShape(int mode, int flags, PickShape pickShape) |
ALLOW_DETACH | final public static int ALLOW_DETACH(Code) | | For BranchGroup nodes, specifies that this BranchGroup allows detaching
from its parent.
|
BranchGroup | public BranchGroup()(Code) | | Constructs and initializes a new BranchGroup node object.
|
cloneNode | public Node cloneNode(boolean forceDuplicate)(Code) | | Creates a new instance of the node. This routine is called
by cloneTree to duplicate the current node.
Parameters: forceDuplicate - when set to true , causes theduplicateOnCloneTree flag to be ignored. Whenfalse , the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied. See Also: Node.cloneTree See Also: Node.cloneNode See Also: Node.duplicateNode See Also: NodeComponent.setDuplicateOnCloneTree |
compile | public void compile()(Code) | | Compiles the source BranchGroup associated with this object and
creates and caches a compiled scene graph.
exception: SceneGraphCycleException - if there is a cycle in thescene graph exception: RestrictedAccessException - if the method is calledwhen this object is part of a live scene graph. |
createRetained | void createRetained()(Code) | | Creates the retained mode BranchGroupRetained object that this
BranchGroup component object will point to.
|
detach | public void detach()(Code) | | Detaches this BranchGroup from its parent.
|
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 BranchGroup 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 BranchGroup is not live. 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: Locale.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 PickShape object See Also: SceneGraphPath See Also: Locale.pickAllSorted See Also: PickShape exception: IllegalStateException - if BranchGroup is not live. |
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 BranchGroup is not live. 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: Locale.pickAllSorted(intintjavax.media.j3d.PickShape) See Also: PickInfo since: Java 3D 1.4 |
pickAny | public PickInfo pickAny(int mode, int flags, PickShape pickShape)(Code) | | Returns a PickInfo which references the pickable item below this
BranchGroup that 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 BranchGroup is not live. 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: Locale.pickAny(intintjavax.media.j3d.PickShape) See Also: PickInfo since: Java 3D 1.4 |
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 BranchGroup is not live. 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: Locale.pickClosest(intintjavax.media.j3d.PickShape) See Also: PickInfo since: Java 3D 1.4 |
validateModeFlagAndPickShape | void validateModeFlagAndPickShape(int mode, int flags, PickShape pickShape)(Code) | | |
|
|