javax.media.j3d
Class ModelClipRetained

java.lang.Object
  extended by javax.media.j3d.IndexedObject
      extended by javax.media.j3d.SceneGraphObjectRetained
          extended by javax.media.j3d.NodeRetained
              extended by javax.media.j3d.LeafRetained
                  extended by javax.media.j3d.ModelClipRetained
All Implemented Interfaces:
java.lang.Cloneable, NnuId

 class ModelClipRetained
extends LeafRetained

The ModelClip retained object.


Field Summary
(package private)  BoundingLeafRetained boundingLeaf
          The bounding leaf reference
(package private) static int BOUNDINGLEAF_CHANGED
           
(package private) static int BOUNDS_CHANGED
           
(package private) static int CLEAR_MIRROR
           
(package private) static int ENABLE_CHANGED
           
(package private)  boolean enableFlag
           
(package private)  boolean[] enables
           
(package private) static int ENABLES_CHANGED
           
(package private)  UnorderList environmentSets
          The EnvironmentSets which reference this model clip.
(package private)  boolean inImmCtx
           
(package private) static int INIT_MIRROR
           
(package private)  boolean isScoped
           
(package private)  boolean isViewScoped
           
(package private) static int LAST_DEFINED_BIT
           
(package private)  ModelClipRetained mirrorModelClip
           
(package private) static int PLANE_CHANGED
           
(package private)  Vector4d[] planes
          The clip planes and the enable bits
(package private) static int PLANES_CHANGED
           
(package private)  Bounds region
          The transformed value of the influencingRegion.
(package private)  Bounds regionOfInfluence
          The Boundary object defining the model clip's region of influencing
(package private) static int SCOPE_CHANGED
           
(package private)  java.util.Vector scopes
          Vector of GroupRetained nodes that scopes this model clip.
(package private)  ModelClipRetained sgModelClip
           
(package private) static int targetThreads
           
(package private)  HashKey tempKey
           
(package private)  Vector4d[] xformPlanes
           
 
Fields inherited from class javax.media.j3d.LeafRetained
boundsDirty, switchState
 
Fields inherited from class javax.media.j3d.NodeRetained
ALTERNATEAPPEARANCE, AMBIENTLIGHT, apiBounds, BACKGROUND, BACKGROUNDSOUND, BEHAVIOR, BOUNDINGLEAF, boundsAutoCompute, BRANCHGROUP, branchGroupPaths, cachedBounds, childIndex, CLIP, collidable, CONESOUND, CONTAINS_VIEWPLATFORM, CURRENT_LOCAL_TO_VWORLD, DECALGROUP, DIRECTIONALLIGHT, EXPONENTIALFOG, geometryBackground, GROUP, inSharedGroup, LAST_LOCAL_TO_VWORLD, LINEARFOG, LINK, localBounds, locale, localToVworld, localToVworldIndex, localToVworldKeys, MODELCLIP, MORPH, nnuId, nodeId, nodeType, NUMNODES, ORDEREDGROUP, orderedId, ORIENTEDSHAPE3D, parent, parentSwitchLink, parentTransformLink, pickable, POINTLIGHT, POINTSOUND, refCount, SHAPE, SHAREDGROUP, SOUNDSCAPE, SPOTLIGHT, staticTransform, SWITCH, TRANSFORMGROUP, universe, validCachedBounds, VIEWPLATFORM, VIEWSPECIFICGROUP
 
Fields inherited from class javax.media.j3d.SceneGraphObjectRetained
DONT_MERGE, inBackgroundGroup, inSetLive, MERGE, MERGE_DONE, mergeFlag, onUpdateList, source
 
Fields inherited from class javax.media.j3d.IndexedObject
listIdx
 
Constructor Summary
ModelClipRetained()
          Constructs and initializes model clip planes
 
Method Summary
(package private)  void addScope(Group scope)
          Appends the specified scope to this node's list of scopes.
(package private)  void clearLive(SetLiveState s)
          This clearLive routine first calls the superclass's method, then it removes itself to the list of model clip
(package private)  void clearMirrorObject(java.lang.Object[] args)
           
protected  java.lang.Object clone()
           
(package private)  java.util.Enumeration getAllScopes()
          Returns an enumeration object of the scoperen.
(package private)  boolean getEnable(int planeNum)
          Gets the specified enable
(package private)  void getEnables(boolean[] enables)
          Gets enables
(package private)  BoundingLeaf getInfluencingBoundingLeaf()
          Get the Model Clip's region of influencing.
(package private)  Bounds getInfluencingBounds()
          Get the Model Clip's region of influencing.
(package private)  boolean getInImmCtx()
          This gets the immedate mode context flag
(package private)  void getMirrorObjects(java.util.ArrayList leafList, HashKey key)
           
(package private)  void getPlane(int planeNum, Vector4d plane)
          Gets the specified clipping plane
(package private)  void getPlanes(Vector4d[] planes)
          Gets planes
(package private)  Group getScope(int index)
          Returns the scope specified by the index.
(package private)  int indexOfScope(Group node)
          Returns the index of the specified Group node within the ModelClip's list of scoped Group nodes
(package private)  void initAddScope(Group scope)
          Appends the specified scope to this node's list of scopes before the fog is alive
(package private)  void initEnable(int planeNum, boolean enable)
          Initializes planes before the object is live
(package private)  void initEnables(boolean[] enables)
          Initializes planes before the object is live
(package private)  void initInfluencingBoundingLeaf(BoundingLeaf region)
          Set the Model Clip's region of influencing to the specified Leaf node.
(package private)  void initInfluencingBounds(Bounds region)
          Set the Model Clip's region of influencing
(package private)  void initInsertScope(Node scope, int index)
          Inserts the specified scope at specified index
(package private)  void initMirrorObject(java.lang.Object[] args)
           
(package private)  void initPlane(int planeNum, Vector4d plane)
          Initializes planes before the object is live
(package private)  void initPlanes(Vector4d[] planes)
          Initializes planes before the object is live
(package private)  void initRemoveAllScopes()
           
(package private)  void initRemoveScope(Group node)
           
(package private)  void initRemoveScope(int index)
           
(package private)  void initScope(Group scope, int index)
          Replaces the specified scope with the scope provided.
(package private)  void insertScope(Node scope, int index)
          Inserts the specified scope at specified index and sends a message
(package private)  void mergeTransform(TransformGroupRetained staticTransform)
           
(package private)  int numScopes()
          Returns a count of this nodes' scopes.
(package private)  void printEnables(java.lang.String string, boolean[] enables)
           
(package private)  void printPlane(int index, java.lang.String string)
           
(package private)  void printPlanes(java.lang.String string, Vector4d[] planes)
           
(package private)  void removeAllScopes()
          Removes all the Group nodes from the ModelClip's scope list.
(package private)  void removeScope(Group node)
          Removes the specified Group node from this ModelClip's list of scopes if the specified node is not found in the list of scoped nodes, method returns quietly.
(package private)  void removeScope(int index)
           
(package private)  void sendMessage(int attrMask, java.lang.Object attr1, java.lang.Object attr2)
           
(package private)  void setEnable(int planeNum, boolean enable)
          Sets the clip planes and send a message
(package private)  void setEnables(boolean[] enables)
          Sets the clip planes and send a message
(package private)  void setInfluencingBoundingLeaf(BoundingLeaf region)
          Set the Model Clip's region of influencing to the specified Leaf node.
(package private)  void setInfluencingBounds(Bounds region)
          Set the Model Clip's region of influencing and send message
(package private)  void setInImmCtx(boolean inCtx)
          This sets the immedate mode context flag
(package private)  void setLive(SetLiveState s)
           
(package private)  void setPlane(int planeNum, Vector4d plane)
          Sets the clip planes and send a message
(package private)  void setPlanes(Vector4d[] planes)
          Sets the clip planes and send a message
(package private)  void setScope(Group scope, int index)
          Replaces the specified scope with the scope provided.
(package private)  void update(Canvas3D cv, int enableMask)
          This method and its native counterpart update the native context model clip planes.
(package private)  void update(Context ctx, int enableMask, Transform3D trans)
           
(package private)  void updateBoundingLeaf()
          Note: This routine will only be called on the mirror object - will update the object's cached region and transformed region
(package private)  void updateImmediateMirrorObject(java.lang.Object[] objs)
           
(package private)  void updateImmediateTransformChange()
           
(package private)  void updateMirrorObject(java.lang.Object[] objs)
           
 
Methods inherited from class javax.media.j3d.LeafRetained
clone, updateBounds, updateTransformChange
 
Methods inherited from class javax.media.j3d.NodeRetained
computeCombineBounds, computeNonLiveLocalToVworld, dirtyBoundsCache, doSetLive, equal, findCollidableFlags, findPickableFlags, findTransformLevels, getBounds, getBoundsAutoCompute, getCollidable, getCurrentLocalToVworld, getCurrentLocalToVworld, getCurrentLocalToVworld, getEffectiveBounds, getId, getLastLocalToVworld, getLastLocalToVworld, getLastLocalToVworld, getLocalBounds, getLocale, getLocalToVworld, getLocalToVworld, getLocalToVworld, getParent, getPickable, getVirtualUniverse, isStatic, merge, notifySceneGraphChanged, processViewSpecificInfo, recombineAbove, removeNodeData, searchGeometryAtoms, setAuxData, setBounds, setBoundsAutoCompute, setCollidable, setNodeData, setParent, setPickable, transformBounds, updateCollidable, updateLocalToVworld, updatePickable
 
Methods inherited from class javax.media.j3d.SceneGraphObjectRetained
clearLive, clearLive, compile, doSetLive, getSource, handleFrequencyChange, isInSetLive, markAsLive, setCompiled, setLive, setSource, traverse
 
Methods inherited from class javax.media.j3d.IndexedObject
getIdxUsed, incIdxUsed
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLANE_CHANGED

static final int PLANE_CHANGED
See Also:
Constant Field Values

PLANES_CHANGED

static final int PLANES_CHANGED
See Also:
Constant Field Values

ENABLE_CHANGED

static final int ENABLE_CHANGED
See Also:
Constant Field Values

ENABLES_CHANGED

static final int ENABLES_CHANGED
See Also:
Constant Field Values

BOUNDS_CHANGED

static final int BOUNDS_CHANGED
See Also:
Constant Field Values

BOUNDINGLEAF_CHANGED

static final int BOUNDINGLEAF_CHANGED
See Also:
Constant Field Values

SCOPE_CHANGED

static final int SCOPE_CHANGED
See Also:
Constant Field Values

INIT_MIRROR

static final int INIT_MIRROR
See Also:
Constant Field Values

CLEAR_MIRROR

static final int CLEAR_MIRROR
See Also:
Constant Field Values

LAST_DEFINED_BIT

static final int LAST_DEFINED_BIT
See Also:
Constant Field Values

planes

Vector4d[] planes
The clip planes and the enable bits


enables

boolean[] enables

xformPlanes

Vector4d[] xformPlanes

enableFlag

boolean enableFlag

regionOfInfluence

Bounds regionOfInfluence
The Boundary object defining the model clip's region of influencing


boundingLeaf

BoundingLeafRetained boundingLeaf
The bounding leaf reference


region

Bounds region
The transformed value of the influencingRegion.


scopes

java.util.Vector scopes
Vector of GroupRetained nodes that scopes this model clip.


isScoped

boolean isScoped

tempKey

HashKey tempKey

inImmCtx

boolean inImmCtx

mirrorModelClip

ModelClipRetained mirrorModelClip

sgModelClip

ModelClipRetained sgModelClip

targetThreads

static final int targetThreads
See Also:
Constant Field Values

environmentSets

UnorderList environmentSets
The EnvironmentSets which reference this model clip. Note that multiple RenderBin update thread may access this shared environmentSets simultaneously. So we use UnorderList which sync. all the operations.


isViewScoped

boolean isViewScoped
Constructor Detail

ModelClipRetained

ModelClipRetained()
Constructs and initializes model clip planes

Method Detail

initPlanes

void initPlanes(Vector4d[] planes)
Initializes planes before the object is live


setPlanes

void setPlanes(Vector4d[] planes)
Sets the clip planes and send a message


initPlane

void initPlane(int planeNum,
               Vector4d plane)
Initializes planes before the object is live


setPlane

void setPlane(int planeNum,
              Vector4d plane)
Sets the clip planes and send a message


getPlanes

void getPlanes(Vector4d[] planes)
Gets planes


getPlane

void getPlane(int planeNum,
              Vector4d plane)
Gets the specified clipping plane


initEnables

void initEnables(boolean[] enables)
Initializes planes before the object is live


setEnables

void setEnables(boolean[] enables)
Sets the clip planes and send a message


initEnable

void initEnable(int planeNum,
                boolean enable)
Initializes planes before the object is live


setEnable

void setEnable(int planeNum,
               boolean enable)
Sets the clip planes and send a message


getEnables

void getEnables(boolean[] enables)
Gets enables


getEnable

boolean getEnable(int planeNum)
Gets the specified enable


initInfluencingBounds

void initInfluencingBounds(Bounds region)
Set the Model Clip's region of influencing


setInfluencingBounds

void setInfluencingBounds(Bounds region)
Set the Model Clip's region of influencing and send message


getInfluencingBounds

Bounds getInfluencingBounds()
Get the Model Clip's region of influencing.


initInfluencingBoundingLeaf

void initInfluencingBoundingLeaf(BoundingLeaf region)
Set the Model Clip's region of influencing to the specified Leaf node.


setInfluencingBoundingLeaf

void setInfluencingBoundingLeaf(BoundingLeaf region)
Set the Model Clip's region of influencing to the specified Leaf node.


getInfluencingBoundingLeaf

BoundingLeaf getInfluencingBoundingLeaf()
Get the Model Clip's region of influencing.


initScope

void initScope(Group scope,
               int index)
Replaces the specified scope with the scope provided.

Parameters:
scope - the new scope
index - which scope to replace

setScope

void setScope(Group scope,
              int index)
Replaces the specified scope with the scope provided.

Parameters:
scope - the new scope
index - which scope to replace

initInsertScope

void initInsertScope(Node scope,
                     int index)
Inserts the specified scope at specified index

Parameters:
scope - the new scope
index - position to insert new scope at

insertScope

void insertScope(Node scope,
                 int index)
Inserts the specified scope at specified index and sends a message

Parameters:
scope - the new scope
index - position to insert new scope at

initRemoveScope

void initRemoveScope(int index)

removeScope

void removeScope(int index)

removeScope

void removeScope(Group node)
Removes the specified Group node from this ModelClip's list of scopes if the specified node is not found in the list of scoped nodes, method returns quietly.

Parameters:
Group - node to be removed

initRemoveScope

void initRemoveScope(Group node)

removeAllScopes

void removeAllScopes()
Removes all the Group nodes from the ModelClip's scope list. The ModelClip reverts to universal scope.


initRemoveAllScopes

void initRemoveAllScopes()

getScope

Group getScope(int index)
Returns the scope specified by the index.

Parameters:
index - which scope to return
Returns:
the scoperen at location index

getAllScopes

java.util.Enumeration getAllScopes()
Returns an enumeration object of the scoperen.

Returns:
an enumeration object of the scoperen

initAddScope

void initAddScope(Group scope)
Appends the specified scope to this node's list of scopes before the fog is alive

Parameters:
scope - the scope to add to this node's list of scopes

addScope

void addScope(Group scope)
Appends the specified scope to this node's list of scopes.

Parameters:
scope - the scope to add to this node's list of scopes

numScopes

int numScopes()
Returns a count of this nodes' scopes.

Returns:
the number of scopes descendant from this node

indexOfScope

int indexOfScope(Group node)
Returns the index of the specified Group node within the ModelClip's list of scoped Group nodes

Parameters:
Group - node whose index is desired
Returns:
index of this node

setInImmCtx

void setInImmCtx(boolean inCtx)
This sets the immedate mode context flag


getInImmCtx

boolean getInImmCtx()
This gets the immedate mode context flag


update

void update(Canvas3D cv,
            int enableMask)
This method and its native counterpart update the native context model clip planes.


update

void update(Context ctx,
            int enableMask,
            Transform3D trans)

initMirrorObject

void initMirrorObject(java.lang.Object[] args)

updateMirrorObject

void updateMirrorObject(java.lang.Object[] objs)
Overrides:
updateMirrorObject in class LeafRetained

updateImmediateMirrorObject

void updateImmediateMirrorObject(java.lang.Object[] objs)

updateBoundingLeaf

void updateBoundingLeaf()
Note: This routine will only be called on the mirror object - will update the object's cached region and transformed region

Overrides:
updateBoundingLeaf in class LeafRetained

setLive

void setLive(SetLiveState s)
Overrides:
setLive in class NodeRetained

clearLive

void clearLive(SetLiveState s)
This clearLive routine first calls the superclass's method, then it removes itself to the list of model clip

Overrides:
clearLive in class NodeRetained

clearMirrorObject

void clearMirrorObject(java.lang.Object[] args)

clone

protected java.lang.Object clone()
Overrides:
clone in class SceneGraphObjectRetained

updateImmediateTransformChange

void updateImmediateTransformChange()

printPlane

void printPlane(int index,
                java.lang.String string)

printPlanes

void printPlanes(java.lang.String string,
                 Vector4d[] planes)

printEnables

void printEnables(java.lang.String string,
                  boolean[] enables)

sendMessage

final void sendMessage(int attrMask,
                       java.lang.Object attr1,
                       java.lang.Object attr2)

mergeTransform

void mergeTransform(TransformGroupRetained staticTransform)
Overrides:
mergeTransform in class NodeRetained

getMirrorObjects

void getMirrorObjects(java.util.ArrayList leafList,
                      HashKey key)
Overrides:
getMirrorObjects in class LeafRetained


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.