|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.j3d.SceneGraphObject | +--javax.media.j3d.Node | +--javax.media.j3d.Group | +--javax.media.j3d.ViewSpecificGroup
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). 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.
Field Summary | |
static int |
ALLOW_VIEW_READ
Specifies that this ViewSpecificGroup node allows reading its view information at runtime. |
static int |
ALLOW_VIEW_WRITE
Specifies that this ViewSpecificGroup node allows writing its view information at runtime. |
Fields inherited from class javax.media.j3d.Group |
ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE |
Fields inherited from class javax.media.j3d.Node |
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING |
Constructor Summary | |
ViewSpecificGroup()
Constructs and initializes a new ViewSpecificGroup node object. |
Method Summary | |
void |
addView(View view)
Appends the specified View object to this node's list of views. |
Node |
cloneNode(boolean forceDuplicate)
Used to create a new instance of the node. |
java.util.Enumeration |
getAllViews()
Returns an enumeration of this ViewSpecificGroup node's list of views. |
View |
getView(int index)
Retrieves the View object at the specified index from this node's list of views. |
int |
indexOfView(View view)
Retrieves the index of the specified View object in this node's list of views. |
void |
insertView(View view,
int index)
Inserts the specified View object into this node's list of views at the specified index. |
int |
numViews()
Returns the number of View objects in this node's list of views. |
void |
removeAllViews()
Removes all View objects from this node's list of views. |
void |
removeView(int index)
Removes the View object at the specified index from this node's list of views. |
void |
removeView(View view)
Removes the specified View object from this node's list of views. |
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. |
Methods inherited from class javax.media.j3d.Group |
addChild, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setChild, setCollisionBounds |
Methods inherited from class javax.media.j3d.Node |
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable |
Methods inherited from class javax.media.j3d.SceneGraphObject |
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ALLOW_VIEW_READ
public static final int ALLOW_VIEW_WRITE
Constructor Detail |
public ViewSpecificGroup()
Method Detail |
public void setView(View view, int index)
view
- the View object to be stored at the specified index.index
- the index of the View object to be replaced.
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic View getView(int index)
index
- the index of the View object to be returned.
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void insertView(View view, int index)
view
- the View object to be inserted at the specified index.index
- the index at which the View object is inserted.
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void removeView(int index)
index
- the index of the View object to be removed.
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic java.util.Enumeration getAllViews()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void addView(View view)
view
- the View object to be appended.
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic int numViews()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic int indexOfView(View view)
view
- the View object to be looked up.
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void removeView(View view)
view
- the View object to be removed.
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void removeAllViews()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic Node cloneNode(boolean forceDuplicate)
cloneTree
to duplicate the current node.
cloneNode
in class Group
forceDuplicate
- when set to true
, causes the
duplicateOnCloneTree
flag to be ignored. When
false
, the value of each node's
duplicateOnCloneTree
variable determines whether
NodeComponent data is duplicated or copied.Node.cloneTree()
,
Node.cloneNode(boolean)
,
Node.duplicateNode(javax.media.j3d.Node, boolean)
,
NodeComponent.setDuplicateOnCloneTree(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |