javax.media.j3d
Class CompileState

java.lang.Object
  extended by javax.media.j3d.CompileState

 class CompileState
extends java.lang.Object

The CompileState holds information used during a compile. It is passed to each SceneGraphObject (SGO) during the compile. Each SGO modifies the CompileState as necessary and passes the CompileState to its children (if any). The CompileState currently has two functions: appearance mapping and shape merging. Appearance mapping maintains a list of the unique appearances seen during the compile. getAppearance() is used to turn multiple, equivalent and static appearances into a single shared appearance. The shape mergings collects shapes that are potentially mergable during a compile. The shapes are sorted into a Map of Lists of shapes, using the shape's appearance as the key. After a subtree is traversed, the shapes are merged and added to the Group.


Field Summary
(package private) static int BOUNDS_READ
           
(package private)  boolean compileVerbose
           
(package private) static int GEOMETRY_READ
           
(package private)  boolean keepTG
           
(package private)  java.util.HashMap knownAppearances
           
(package private)  boolean needNormalsTransform
           
(package private)  int numAppearances
           
(package private)  int numGroups
           
(package private)  int numLinks
           
(package private)  int numMergedGroups
           
(package private)  int numMergedTransformGroups
           
(package private)  int numMergeSets
           
(package private)  int numMergeShapes
           
(package private)  int numMorphs
           
(package private)  int numOrderedGroups
           
(package private)  int numShapes
           
(package private)  int numShapesWSharedGeom
           
(package private)  int numShapesWStaticTG
           
(package private)  int numShared
           
(package private)  int numStaticTransformGroups
           
(package private)  int numSwitches
           
(package private)  int numTransformGroups
           
(package private)  GroupRetained parentGroup
           
(package private)  java.util.HashMap shapeLists
           
(package private)  TransformGroupRetained staticTransform
           
(package private)  java.util.ArrayList staticTransformObjects
           
(package private)  java.util.ArrayList transformGroupChildrenList
           
 
Constructor Summary
CompileState()
           
 
Method Summary
(package private)  void addShape(Shape3DRetained shape)
           
(package private)  void doShapeMerge()
           
(package private)  AppearanceRetained getAppearance(AppearanceRetained app)
          Returns an unique appearance which equals app.
(package private)  int getCompileFlags(Shape3DRetained shape)
           
private  void initShapeMerge()
           
(package private)  void printStats()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

knownAppearances

java.util.HashMap knownAppearances

numAppearances

int numAppearances

numShared

int numShared

numShapes

int numShapes

shapeLists

java.util.HashMap shapeLists

numMergeSets

int numMergeSets

numMergeShapes

int numMergeShapes

compileVerbose

boolean compileVerbose

BOUNDS_READ

static final int BOUNDS_READ
See Also:
Constant Field Values

GEOMETRY_READ

static final int GEOMETRY_READ
See Also:
Constant Field Values

keepTG

boolean keepTG

needNormalsTransform

boolean needNormalsTransform

staticTransform

TransformGroupRetained staticTransform

parentGroup

GroupRetained parentGroup

transformGroupChildrenList

java.util.ArrayList transformGroupChildrenList

staticTransformObjects

java.util.ArrayList staticTransformObjects

numTransformGroups

int numTransformGroups

numStaticTransformGroups

int numStaticTransformGroups

numMergedTransformGroups

int numMergedTransformGroups

numGroups

int numGroups

numMergedGroups

int numMergedGroups

numShapesWSharedGeom

int numShapesWSharedGeom

numShapesWStaticTG

int numShapesWStaticTG

numLinks

int numLinks

numSwitches

int numSwitches

numOrderedGroups

int numOrderedGroups

numMorphs

int numMorphs
Constructor Detail

CompileState

CompileState()
Method Detail

getAppearance

AppearanceRetained getAppearance(AppearanceRetained app)
Returns an unique appearance which equals app. If appearance does not equal any previously found, the appearance will be added to the known appearances and be returned. If the apperance equals a previously known appearance, then the prevously known apperance will be returned


initShapeMerge

private void initShapeMerge()

addShape

void addShape(Shape3DRetained shape)

printStats

void printStats()

doShapeMerge

void doShapeMerge()

getCompileFlags

int getCompileFlags(Shape3DRetained shape)


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