| java.lang.Object javax.media.j3d.SceneGraphObject javax.media.j3d.Node javax.media.j3d.Group javax.media.j3d.ViewSpecificGroup
ViewSpecificGroup | public class ViewSpecificGroup extends Group (Code) | | The ViewSpecificGroup node is a Group whose descendants are
rendered only on a specified set of views. It
contains a list of views on which its descendants are
rendered. Methods are provided to add, remove, and enumerate the
list of views. The list of views is initially empty, meaning that
the descendants of this group will not be rendered on any view. At
least one view must be added to the list of views for rendering to
occur.
All nodes except ViewPlatform may appear as a descendant of
ViewSpecificGroup, including another ViewSpecificGroup. If a
ViewSpecificGroup is a descendant of a ViewSpecificGroup, the
effect is to intersect the view sets of the ViewSpecificGroup nodes
in the hierarchy; each ViewSpecificGroup encountered when
traversing the scene graph further restricts the set of views on
which its descendants are rendered. More formally, descendant
nodes of ViewSpecificGroups are rendered in (or apply to) only
those views that are contained in the set of views of every
ViewSpecificGroup in the scene graph path from the Locale to the
Node.
Behavior
nodes may appear under a ViewSpecificGroup, but are not affected by
it--the Behavior scheduler is per-universe rather than per-View.
BoundingLeaf nodes are similarly unaffected by being under a
ViewSpecificGroup. A BoundingLeaf under a ViewSpecificGroup
provides a valid bounds for any node that refers to it,
irrespective of the view.
The rest of the leaf nodes either: A) are only rendered within the
specified view(s), for example, Shape3D, Morph, and Sound; or B)
only affect other objects when they are rendered in the specified
view(s), for example, AlternateAppearance, Clip, ModelClip, Fog,
Light, Soundscape, Background.
since: Java 3D 1.3 |
Field Summary | |
final public static int | ALLOW_VIEW_READ Specifies that this ViewSpecificGroup node allows reading its
view information at runtime. | final public static int | ALLOW_VIEW_WRITE Specifies that this ViewSpecificGroup node allows writing its
view information at runtime. |
Constructor Summary | |
public | ViewSpecificGroup() Constructs and initializes a new ViewSpecificGroup node object. |
Method Summary | |
public void | addView(View view) Appends the specified View object to this node's list of views. | public Node | cloneNode(boolean forceDuplicate) Used to create a new instance of the node. | void | createRetained() Creates the retained mode ViewSpecificGroupRetained object that this
ViewSpecificGroup component object will point to. | void | duplicateAttributes(Node originalNode, boolean forceDuplicate) Copies all ViewSpecificGroup information from
originalNode into
the current node. | public Enumeration | getAllViews() Returns an enumeration of this ViewSpecificGroup node's list
of views. | public View | getView(int index) Retrieves the View object at the specified index from this node's
list of views.
Parameters: index - the index of the View object to be returned. | public int | indexOfView(View view) Retrieves the index of the specified View object in this
node's list of views.
Parameters: view - the View object to be looked up. | public void | insertView(View view, int index) Inserts the specified View object into this node's
list of views at the specified index. | public int | numViews() Returns the number of View objects in this node's list of views. | public void | removeAllViews() Removes all View objects from this node's
list of views. | public void | removeView(int index) Removes the View object at the specified index from this node's
list of views. | public void | removeView(View view) Removes the specified View object from this
node's list of views. | public void | setView(View view, int index) Replaces the view at the specified index in this node's
list of views with the specified View object. |
ALLOW_VIEW_READ | final public static int ALLOW_VIEW_READ(Code) | | Specifies that this ViewSpecificGroup node allows reading its
view information at runtime.
|
ALLOW_VIEW_WRITE | final public static int ALLOW_VIEW_WRITE(Code) | | Specifies that this ViewSpecificGroup node allows writing its
view information at runtime.
|
ViewSpecificGroup | public ViewSpecificGroup()(Code) | | Constructs and initializes a new ViewSpecificGroup node object.
|
addView | public void addView(View view)(Code) | | Appends the specified View object to this node's list of views.
Parameters: view - the View object to be appended. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
cloneNode | public Node cloneNode(boolean forceDuplicate)(Code) | | Used to create 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 |
createRetained | void createRetained()(Code) | | Creates the retained mode ViewSpecificGroupRetained object that this
ViewSpecificGroup component object will point to.
|
duplicateAttributes | void duplicateAttributes(Node originalNode, boolean forceDuplicate)(Code) | | Copies all ViewSpecificGroup information from
originalNode into
the current node. This method is called from the
cloneNode method which is, in turn, called by the
cloneTree method.
Parameters: originalNode - the original node to duplicate. 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. exception: RestrictedAccessException - if this object is part of a liveor compiled scenegraph. See Also: Group.cloneNode See Also: Node.duplicateNode See Also: Node.cloneTree See Also: NodeComponent.setDuplicateOnCloneTree |
getAllViews | public Enumeration getAllViews()(Code) | | Returns an enumeration of this ViewSpecificGroup node's list
of views.
an Enumeration object containing all the views. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
getView | public View getView(int index)(Code) | | Retrieves the View object at the specified index from this node's
list of views.
Parameters: index - the index of the View object to be returned. the View object at the specified index. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
indexOfView | public int indexOfView(View view)(Code) | | Retrieves the index of the specified View object in this
node's list of views.
Parameters: view - the View object to be looked up. the index of the specified View object;returns -1 if the object is not in the list. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
insertView | public void insertView(View view, int index)(Code) | | Inserts the specified View object into this node's
list of views at the specified index.
Parameters: view - the View object to be inserted at the specified index. Parameters: index - the index at which the View object is inserted. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
numViews | public int numViews()(Code) | | Returns the number of View objects in this node's list of views.
If this number is 0, then the list of views is empty and
the descendants of this ViewSpecificGroup node will not be
rendered.
the number of views in this node's list of views. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
removeAllViews | public void removeAllViews()(Code) | | Removes all View objects from this node's
list of views.
Since this method clears the list of views, the descendants of
this ViewSpecificGroup node will not be rendered.
exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
removeView | public void removeView(int index)(Code) | | Removes the View object at the specified index from this node's
list of views.
If this operation causes the list of views to become empty,
then the descendants of this ViewSpecificGroup node will not be
rendered.
Parameters: index - the index of the View object to be removed. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
removeView | public void removeView(View view)(Code) | | Removes the specified View object from this
node's list of views. If the specified object is not in the
list, the list is not modified.
If this operation causes the list of views to become empty,
then the descendants of this ViewSpecificGroup node will not be
rendered.
Parameters: view - the View object to be removed. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph since: Java 3D 1.3 |
setView | public void setView(View view, int index)(Code) | | Replaces the view at the specified index in this node's
list of views with the specified View object.
Parameters: view - the View object to be stored at the specified index. Parameters: index - the index of the View object to be replaced. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph |
|
|