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

Quick Search    Search Deep

com.trapezium.chisel.cleaners
Class IFS_NoFaceRemover  view IFS_NoFaceRemover download IFS_NoFaceRemover.java

java.lang.Object
  extended bycom.trapezium.chisel.Optimizer
      extended bycom.trapezium.chisel.cleaners.IFS_NoFaceRemover
All Implemented Interfaces:
java.util.EventListener, com.trapezium.chisel.NodeLocatorListener, com.trapezium.chisel.OptionHolder

public class IFS_NoFaceRemover
extends com.trapezium.chisel.Optimizer

This removes IndexedFaceSets that have no faces, unless the IFS has a DEF that is used.


Field Summary
(package private)  com.trapezium.vrml.visitor.ISLocator isLocator
           
(package private)  java.util.Hashtable redeffedNodes
           
(package private)  int removedNodeCount
           
(package private)  java.util.Vector uselessNodeList
           
 
Fields inherited from class com.trapezium.chisel.Optimizer
baseFileName, baseFilePath, dataSource
 
Constructor Summary
IFS_NoFaceRemover()
           
 
Method Summary
 void attemptOptimization(com.trapezium.vrml.node.Node n)
          template, subclasses override this if they modify Nodes
(package private)  void checkReplace(com.trapezium.vrml.node.DEFUSENode dun, com.trapezium.vrml.node.Node n)
          Replace a USE node with the corresponding DEF on first USE encountered, but only do this if the USE node is within an area that is being removed.
(package private)  void checkUSE(com.trapezium.vrml.fields.Field f)
          Check if a Node field is a USE node, and is USEing a DEF being removed.
 void optimize(com.trapezium.chisel.TokenPrinter tp, java.lang.Object param, int startTokenOffset, int endTokenOffset)
          Two possibilities here, if the param is null, we are removing the VrmlElement, so we just count the removal and do nothing.
 void reset()
          reset optimizer, subclasses may need this
 void summarize(java.io.PrintStream ps)
          default summary (none), used by command line version
 
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, routeFound, setBaseFileName, setBaseFilePath, setDataSource, setNodeName, setOptionConstraints, setOptionValue, setRangeReplacer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

removedNodeCount

int removedNodeCount

uselessNodeList

java.util.Vector uselessNodeList

redeffedNodes

java.util.Hashtable redeffedNodes

isLocator

com.trapezium.vrml.visitor.ISLocator isLocator
Constructor Detail

IFS_NoFaceRemover

public IFS_NoFaceRemover()
Method Detail

reset

public void reset()
Description copied from class: com.trapezium.chisel.Optimizer
reset optimizer, subclasses may need this


attemptOptimization

public void attemptOptimization(com.trapezium.vrml.node.Node n)
Description copied from class: com.trapezium.chisel.Optimizer
template, subclasses override this if they modify Nodes


checkUSE

void checkUSE(com.trapezium.vrml.fields.Field f)
Check if a Node field is a USE node, and is USEing a DEF being removed. If it is, then that USE node gets converted into the removed DEF.


checkReplace

void checkReplace(com.trapezium.vrml.node.DEFUSENode dun,
                  com.trapezium.vrml.node.Node n)
Replace a USE node with the corresponding DEF on first USE encountered, but only do this if the USE node is within an area that is being removed.


optimize

public void optimize(com.trapezium.chisel.TokenPrinter tp,
                     java.lang.Object param,
                     int startTokenOffset,
                     int endTokenOffset)
Two possibilities here, if the param is null, we are removing the VrmlElement, so we just count the removal and do nothing. If the param is a Node, it means that we have previously removed the DEF for a USE node, so the USE node is transformed into the original DEF.


summarize

public void summarize(java.io.PrintStream ps)
Description copied from class: com.trapezium.chisel.Optimizer
default summary (none), used by command line version