javax.media.j3d
Class CompileState
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
CompileState
CompileState()
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.