Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.trapezium.chisel.reorganizers
Class ShapeConnectivitySplitter  view ShapeConnectivitySplitter download ShapeConnectivitySplitter.java

java.lang.Object
  extended bycom.trapezium.chisel.Optimizer
      extended bycom.trapezium.chisel.reducers.IFS_SpaceStructureLoader
          extended bycom.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.


Nested Class Summary
(package private)  class ShapeConnectivitySplitter.ConnectivityInfo
           
 
Nested classes inherited from class com.trapezium.chisel.reducers.IFS_SpaceStructureLoader
 
Field Summary
(package private)  java.lang.String[] fieldNames
           
(package private)  int firstIFSfieldOffset
          Print up to first field in IFS
(package private)  int lastIFSfieldOffset
           
(package private)  java.lang.String[] skipFields
           
(package private)  com.trapezium.vrml.node.space.SpaceStructure ss
           
 
Fields inherited from class com.trapezium.chisel.reducers.IFS_SpaceStructureLoader
 
Fields inherited from class com.trapezium.chisel.Optimizer
baseFileName, baseFilePath, dataSource
 
Constructor Summary
ShapeConnectivitySplitter()
           
 
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.reducers.IFS_SpaceStructureLoader
replaceColor, replaceColorIndex
 
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
 

Field Detail

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
Constructor Detail

ShapeConnectivitySplitter

public ShapeConnectivitySplitter()
Method Detail

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)