| javax.media.j3d.Node javax.media.j3d.Group javax.media.j3d.TransformGroup org.jdesktop.j3d.utils.scenegraph.transparency.TransparencyOrderedGroup
TransparencyOrderedGroup | public class TransparencyOrderedGroup extends javax.media.j3d.TransformGroup (Code) | | Provides the user control over the rendering order of transparent objects
in the subgraphs of this Group.
Transparent shapes in the 1st child of this group will be rendered before
(ie behind) transparent shapes in the 2nd child and so on.
Transparent shapes in the same child will be ordered using the standard test
of distance to view.
TransparencyOrderedGroups can not be included under a SharedGroup. If they
are a RuntimeException will be thrown when the graph is made live.
Even though this class is a subclass of TransformGroup it should be treated
as a Group. The subclassing TransformGroup is an implementation detail,
all of the TransformGroup specific methods will throw RuntimeExceptions.
author: paulby |
Method Summary | |
public void | addChild(Node child) Appends the specified child node to this group node's list of children.
If the current child index order array is non-null, the array
is increased in size by one element, and a new element
containing the index of the new child is added to the end of
the array. | public void | addChild(Node child, int[] childIndexOrder) Appends the specified child node to this group node's list of
children, and sets the child index order array to the specified
array. | public int[] | getChildIndexOrder() Retrieves the current childIndexOrder array. | int | getRenderingOrderForChild(int childIndex) | public void | getTransform(Transform3D t) | public void | insertChild(Node child, int index) Inserts the specified child node in this group node's list of
children at the specified index.
This method is only supported when the child index order array
is null.
Parameters: child - the new child Parameters: index - at which location to insert. | public void | removeChild(Node child) Removes the specified child node from this group node's
list of children.
If the specified object is not in the list, the list is not modified.
If the current child index order array is non-null, the element
containing the removed child's index will be removed from the
child index order array, and the array will be reduced in size
by one element. | public void | removeChild(int index) Removes the child node at the specified index from this group node's
list of children.
If the current child index order array is non-null, the element
containing the removed child's index will be removed from the
child index order array, and the array will be reduced in size
by one element. | public void | setChild(Node child, int index) Replaces the node at the specified index with the child node provided.
This method is only supported when the child index order array
is null.
Parameters: child - the new child Parameters: index - of node to replace. | public void | setChildIndexOrder(int[] childIndexOrder) Sets the childIndexOrder array. | public void | setTransform(Transform3D t) | void | verifyChildIndexOrderArray(int[] cIOArr, int plus) |
TransparencyOrderedGroup | public TransparencyOrderedGroup()(Code) | | Creates a new instance of TransparencyOrderedGroup
|
addChild | public void addChild(Node child)(Code) | | Appends the specified child node to this group node's list of children.
If the current child index order array is non-null, the array
is increased in size by one element, and a new element
containing the index of the new child is added to the end of
the array. Thus, this new child will be rendered last.
Parameters: child - the child to add to this node's list of children exception: CapabilityNotSetException - if the appropriate capability isnot set and this group node is part of live or compiled scene graph exception: RestrictedAccessException - if this group node is partof liveor compiled scene graph and the child node being added is nota BranchGroup node exception: MultipleParentException - if child has alreadybeen added as a child of another group node. |
addChild | public void addChild(Node child, int[] childIndexOrder)(Code) | | Appends the specified child node to this group node's list of
children, and sets the child index order array to the specified
array. If the specified array is null, this node's
childIndexOrder array is set to null. Its children will then
be rendered in increasing index order. If the specified array
is not null, the entire array is copied to this node's
childIndexOrder array. In this case, the length of the array
must be equal to the number of children in this group after the
new child has been added, and every entry in the array must
have a unique value between 0 and numChildren-1
(i.e., there must be no duplicate values and no missing
indices).
Parameters: child - the child to add to this node's list of children Parameters: childIndexOrder - the array that is copied into thisnode's child index order array; this can be null exception: CapabilityNotSetException - if the appropriate capability isnot set and this group node is part of live or compiled scene graph exception: RestrictedAccessException - if this group node is partof liveor compiled scene graph and the child node being added is nota BranchGroup node exception: MultipleParentException - if child has alreadybeen added as a child of another group node. exception: IllegalArgumentException - if the specified array isnon-null and any of the following are true:childIndexOrder.length != numChildren ;childIndexOrder[ i] < 0 ,for i in [0, numChildren-1] ;childIndexOrder[ i] >= numChildren ,for i in [0, numChildren-1] ;childIndexOrder[ i] ==childIndexOrder[ j] ,for i,j in [0, numChildren-1] ,i != j;
|
getChildIndexOrder | public int[] getChildIndexOrder()(Code) | | Retrieves the current childIndexOrder array.
a copy of this node's childIndexOrder array; thiscan be null. |
getRenderingOrderForChild | int getRenderingOrderForChild(int childIndex)(Code) | | Given the index of the child return the rendering order for that child
|
getTransform | public void getTransform(Transform3D t)(Code) | | TransparencyOrderedGroup should not be used as a TransformGroup, this
method will always throw a RuntimeException
|
insertChild | public void insertChild(Node child, int index)(Code) | | Inserts the specified child node in this group node's list of
children at the specified index.
This method is only supported when the child index order array
is null.
Parameters: child - the new child Parameters: index - at which location to insert. The index must be a valuegreater than or equal to 0 and less than or equal tonumChildren() . exception: CapabilityNotSetException - if the appropriate capability isnot set and this group node is part of live or compiled scene graph exception: RestrictedAccessException - if this group node is part ofliveor compiled scene graph and the child node being inserted is nota BranchGroup node exception: MultipleParentException - if child has alreadybeen added as a child of another group node. exception: IndexOutOfBoundsException - if index is invalid. exception: IllegalStateException - if the childIndexOrder array isnot null. |
removeChild | public void removeChild(Node child)(Code) | | Removes the specified child node from this group node's
list of children.
If the specified object is not in the list, the list is not modified.
If the current child index order array is non-null, the element
containing the removed child's index will be removed from the
child index order array, and the array will be reduced in size
by one element. If the child removed was not the last child in
the Group, the values of the child index order array will be
updated to reflect the indices that were renumbered. More
formally, each child whose index in the Group node was greater
than the removed element (before removal) will have its index
decremented by one.
Parameters: child - the child node to be removed. exception: CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph exception: RestrictedAccessException - if this group node is part oflive or compiled scene graph and the child node being removed is nota BranchGroup node |
removeChild | public void removeChild(int index)(Code) | | Removes the child node at the specified index from this group node's
list of children.
If the current child index order array is non-null, the element
containing the removed child's index will be removed from the
child index order array, and the array will be reduced in size
by one element. If the child removed was not the last child in
the Group, the values of the child index order array will be
updated to reflect the indices that were renumbered. More
formally, each child whose index in the Group node was greater
than the removed element (before removal) will have its index
decremented by one.
Parameters: index - which child to remove. The index must be a valuegreater than or equal to 0 and less than numChildren() . exception: CapabilityNotSetException - if the appropriate capability isnot set and this group node is part of live or compiled scene graph exception: RestrictedAccessException - if this group node is part oflive or compiled scene graph and the child node being removed is nota BranchGroup node exception: IndexOutOfBoundsException - if index is invalid. |
setChild | public void setChild(Node child, int index)(Code) | | Replaces the node at the specified index with the child node provided.
This method is only supported when the child index order array
is null.
Parameters: child - the new child Parameters: index - of node to replace. The index must be a valuegreater than or equal to 0 and less than or equal tonumChildren() . exception: CapabilityNotSetException - if the appropriate capability isnot set and this group node is part of live or compiled scene graph exception: RestrictedAccessException - if this group node is part ofliveor compiled scene graph and the child node being inserted is nota BranchGroup node exception: MultipleParentException - if child has alreadybeen added as a child of another group node. exception: IndexOutOfBoundsException - if index is invalid. exception: IllegalStateException - if the childIndexOrder array isnot null. |
setChildIndexOrder | public void setChildIndexOrder(int[] childIndexOrder)(Code) | | Sets the childIndexOrder array. If the specified array is
null, this node's childIndexOrder array is set to null. Its
children will then be rendered in increasing index order. If
the specified array is not null, the entire array is copied to
this node's childIndexOrder array. In this case, the length of
the array must be equal to the number of children in this
group, and every entry in the array must have a unique value
between 0 and numChildren-1 (i.e., there must be
no duplicate values and no missing indices).
Parameters: childIndexOrder - the array that is copied into thisnode's child index order array; this can be null exception: IllegalArgumentException - if the specified array isnon-null and any of the following are true:childIndexOrder.length != numChildren ;childIndexOrder[ i] < 0 ,for i in [0, numChildren-1] ;childIndexOrder[ i] >= numChildren ,for i in [0, numChildren-1] ;childIndexOrder[ i] ==childIndexOrder[ j] ,for i,j in [0, numChildren-1] ,i != j;
|
setTransform | public void setTransform(Transform3D t)(Code) | | TransparencyOrderedGroup should not be used as a TransformGroup, this
method will always throw a RuntimeException
|
verifyChildIndexOrderArray | void verifyChildIndexOrderArray(int[] cIOArr, int plus)(Code) | | |
Fields inherited from javax.media.j3d.TransformGroup | final public static int ALLOW_TRANSFORM_READ(Code)(Java Doc) final public static int ALLOW_TRANSFORM_WRITE(Code)(Java Doc)
|
|
|