java.lang.Object
com.trapezium.chisel.Optimizer
com.trapezium.chisel.reducers.IFS_SpaceStructureLoader
com.trapezium.chisel.reorganizers.ShapeConnectivitySplitter
- All Implemented Interfaces:
- java.util.EventListener, com.trapezium.chisel.NodeLocatorListener, com.trapezium.chisel.OptionHolder
- public class ShapeConnectivitySplitter
- extends com.trapezium.chisel.reducers.IFS_SpaceStructureLoader
Splits IndexedFaceSets into connectivity sections, each in its
own IndexedFaceSet.
|
Method Summary |
void |
attemptOptimization(com.trapezium.vrml.node.Node n)
This chisel taks the approach of just replacing entire Shape node. |
(package private) void |
initOffsets(com.trapezium.vrml.node.Node ifs)
|
void |
optimize(com.trapezium.chisel.TokenPrinter tp,
java.lang.Object param,
int startTokenOffset,
int endTokenOffset)
|
(package private) void |
printColorInfo(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
int offset,
com.trapezium.vrml.node.Node ifs)
Print color info for a specific connectivity section |
(package private) void |
printCoordIndex(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
int offset)
|
(package private) void |
printFace(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
com.trapezium.vrml.node.space.SpaceEntitySet faces,
com.trapezium.vrml.node.space.SpacePrimitive face)
|
(package private) void |
printHeader(com.trapezium.chisel.TokenPrinter tp,
int startTokenOffset,
int endTokenOffset)
|
(package private) void |
printNormalInfo(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
int offset,
com.trapezium.vrml.node.Node ifs)
Print normal info for a specific connectivity section |
(package private) void |
printRange(com.trapezium.chisel.TokenPrinter tp,
int firstInRange,
int lastInRange,
int tokenBoundary)
|
(package private) void |
printSkippingFields(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.Node ifs,
java.lang.String[] fieldList)
|
(package private) void |
printTrailer(com.trapezium.chisel.TokenPrinter tp,
int endTokenOffset)
|
(package private) void |
printValues(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
int offset,
int scanner,
int endTokenOffset,
int factor)
|
void |
replaceCoord(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
int startTokenOffset,
int endTokenOffset)
|
void |
replaceCoordIndex(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
int startTokenOffset,
int endTokenOffset)
|
void |
replaceTexCoordIndex(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
int startTokenOffset,
int endTokenOffset)
|
(package private) void |
setFieldOffset(com.trapezium.vrml.fields.Field f)
|
void |
setSpaceStructure(com.trapezium.vrml.node.space.SpaceStructure ss)
|
| Methods inherited from class com.trapezium.chisel.Optimizer |
addAdditionalNode, attemptOptimization, booleanToOptionValue, eofTokens, getActionMessage, getAdditionalName, getNodeName, getNumberAdditionalNames, getNumberOptions, getOptionClass, getOptionConstraints, getOptionLabel, getOptionValue, hasFinalCode, intToOptionValue, isDEFlistener, isDEFUSElistener, isPROTOlistener, isROUTElistener, nodeFound, optimizePossible, optionValueToBoolean, optionValueToInt, printFinalCode, printNumbers, replaceIndexFaceMultiple, replaceRange, replaceStartEnd, replaceValueNodeFaceMultiple, reset, routeFound, setBaseFileName, setBaseFilePath, setDataSource, setNodeName, setOptionConstraints, setOptionValue, setRangeReplacer, summarize |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ss
com.trapezium.vrml.node.space.SpaceStructure ss
skipFields
java.lang.String[] skipFields
firstIFSfieldOffset
int firstIFSfieldOffset
- Print up to first field in IFS
lastIFSfieldOffset
int lastIFSfieldOffset
fieldNames
java.lang.String[] fieldNames
ShapeConnectivitySplitter
public ShapeConnectivitySplitter()
setSpaceStructure
public void setSpaceStructure(com.trapezium.vrml.node.space.SpaceStructure ss)
attemptOptimization
public void attemptOptimization(com.trapezium.vrml.node.Node n)
- This chisel taks the approach of just replacing entire Shape node.
This approach is a mistake, makes PROTO/IS handling nearly impossible.
Have to rewrite this to use field-by-field replacement technique.
optimize
public void optimize(com.trapezium.chisel.TokenPrinter tp,
java.lang.Object param,
int startTokenOffset,
int endTokenOffset)
setFieldOffset
void setFieldOffset(com.trapezium.vrml.fields.Field f)
initOffsets
void initOffsets(com.trapezium.vrml.node.Node ifs)
printHeader
void printHeader(com.trapezium.chisel.TokenPrinter tp,
int startTokenOffset,
int endTokenOffset)
printTrailer
void printTrailer(com.trapezium.chisel.TokenPrinter tp,
int endTokenOffset)
printRange
void printRange(com.trapezium.chisel.TokenPrinter tp,
int firstInRange,
int lastInRange,
int tokenBoundary)
printColorInfo
void printColorInfo(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
int offset,
com.trapezium.vrml.node.Node ifs)
- Print color info for a specific connectivity section
printNormalInfo
void printNormalInfo(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
int offset,
com.trapezium.vrml.node.Node ifs)
- Print normal info for a specific connectivity section
printValues
void printValues(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
int offset,
int scanner,
int endTokenOffset,
int factor)
printCoordIndex
void printCoordIndex(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
int offset)
printFace
void printFace(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
com.trapezium.vrml.node.space.SpaceEntitySet faces,
com.trapezium.vrml.node.space.SpacePrimitive face)
printSkippingFields
void printSkippingFields(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.Node ifs,
java.lang.String[] fieldList)
replaceCoord
public void replaceCoord(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
int startTokenOffset,
int endTokenOffset)
replaceCoordIndex
public void replaceCoordIndex(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
int startTokenOffset,
int endTokenOffset)
replaceTexCoordIndex
public void replaceTexCoordIndex(com.trapezium.chisel.TokenPrinter tp,
com.trapezium.vrml.node.space.SpaceStructure ss,
int startTokenOffset,
int endTokenOffset)