hmi.facegraphics.deformers
Class Deformer

java.lang.Object
  extended by hmi.xml.XMLStructureAdapter
      extended by hmi.facegraphics.deformers.Deformer
All Implemented Interfaces:
DeformerServer, XMLStructure
Direct Known Subclasses:
EaseDeformer, SmoothDeformer

public abstract class Deformer
extends XMLStructureAdapter
implements DeformerServer


Field Summary
protected  DeformerClient client
           
private  float[] displacement
           
protected  FAP fap
           
protected  float[] fpNeutralPos
           
protected  float[] fpPos
           
protected  GLHead head
           
protected  float size
           
protected  int value
           
 
Fields inherited from class hmi.xml.XMLStructureAdapter
ATTRIBUTE_TOKEN_DELIMITERS, COMMA_SEPARATOR, DECODEDARRAYSIZE, DEFAULT_RECOVER_MODE, NEWLINE, SYSTEMNEWLINE, TAB, TAB_STRING
 
Constructor Summary
Deformer()
           
 
Method Summary
 StringBuilder appendContent(StringBuilder buf, XMLFormatting fmt)
          Appends a String to buf that encodes the contents for the XML encoding.
private  void calculateDisplacement()
           
abstract  void copyFrom(Deformer source)
           
 void decodeContent(XMLTokenizer tokenizer)
          decodes the XML contents, i.e. the XML between the STag and ETag of the encoding.
 void deform()
           
protected  void emitSize(float size)
           
protected  void emitValue(int value)
           
 float[] getDisplacement()
           
(package private)  float getDistance(float[] a, float[] b, float scalex, float scaley, float scalez)
           
 FAP getFAP()
           
 float[] getFullDisplacement()
           
 float getSize()
           
 int getValue()
           
 HashMap<Integer,Float> getVertexWeights()
           
(package private)  float getWeight(int index)
           
 void setClient(DeformerClient client)
           
 void setFAP(FAP fap)
           
 void setHead(GLHead head)
           
 void setSize(float size)
           
 void setValue(int value)
           
 void updateSize(float size)
           
 void updateValue(int value)
           
 
Methods inherited from class hmi.xml.XMLStructureAdapter
appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttribute, appendAttributes, appendAttributes, appendAttributeString, appendAttributeString, appendBooleans, appendCloseEmptyTag, appendCloseSTag, appendComment, appendContent, appendDoubleElement, appendEmptyTag, appendEmptyTag, appendEmptyTag, appendEmptyTag, appendEmptyTag, appendEmptyTag, appendETag, appendETag, appendFloatArrayElement, appendFloatElement, appendFloats, appendIntArrayElement, appendIntElement, appendInts, appendLongElement, appendNewLine, appendNewLine, appendNewLine, appendOpenSTag, appendOptionalDoubleElement, appendOptionalFloatElement, appendOptionalIntElement, appendOptionalLongElement, appendSpaces, appendSpaces, appendSTag, appendSTag, appendSTag, appendStringArrayElement, appendStrings, appendSystemNewLine, appendTab, appendTextElement, appendXML, appendXML, appendXML, appendXML, appendXML, appendXMLStructure, appendXMLStructureList, appendXMLTextElementList, countTokens, countTokens, decodeAttribute, decodeAttribute, decodeAttributes, decodeBoolean, decodeBooleanArray, decodeBooleanArray, decodeBooleanArray, decodeBooleanArray, decodeDouble, decodeDoubleArray, decodeDoubleArray, decodeDoubleArray, decodeDoubleArray, decodeFloat, decodeFloatArray, decodeFloatArray, decodeFloatArray, decodeFloatArray, decodeInt, decodeIntArray, decodeIntArray, decodeIntArray, decodeIntArray, decodeLong, decodeStringArray, decodeStringArray, decodeStringArray, decodeStringArray, decodeXMLStructureList, decodeXMLValueElement, getNamespace, getOptionalAttribute, getOptionalAttribute, getOptionalBooleanAttribute, getOptionalDoubleAttribute, getOptionalFloatAttribute, getOptionalIntAttribute, getOptionalLongAttribute, getRequiredAttribute, getRequiredBooleanAttribute, getRequiredDoubleAttribute, getRequiredFloatAttribute, getRequiredIntAttribute, getRequiredLongAttribute, getTagLine, getXMLTag, hasContent, parseXMLElement, postProcess, preProcess, readXML, readXML, readXML, setConsoleAttributeEnabled, setDefaultRecoverMode, setRecoverMode, spaces, toString, toXMLString, toXMLString, toXMLString, toXMLString, toXMLString, toXMLString, writeXML, writeXML, writeXML, writeXML, xmlTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

size

protected float size

fap

protected FAP fap

value

protected int value

head

protected GLHead head

fpNeutralPos

protected float[] fpNeutralPos

fpPos

protected float[] fpPos

displacement

private float[] displacement

client

protected DeformerClient client
Constructor Detail

Deformer

public Deformer()
Method Detail

setHead

public void setHead(GLHead head)

setFAP

public void setFAP(FAP fap)

getFAP

public FAP getFAP()

updateSize

public void updateSize(float size)
Specified by:
updateSize in interface DeformerServer

setSize

public void setSize(float size)

getSize

public float getSize()
Specified by:
getSize in interface DeformerServer

updateValue

public void updateValue(int value)
Specified by:
updateValue in interface DeformerServer

setValue

public void setValue(int value)

getValue

public int getValue()
Specified by:
getValue in interface DeformerServer

setClient

public void setClient(DeformerClient client)

emitSize

protected void emitSize(float size)

emitValue

protected void emitValue(int value)

copyFrom

public abstract void copyFrom(Deformer source)

deform

public void deform()

getDisplacement

public float[] getDisplacement()

getFullDisplacement

public float[] getFullDisplacement()

calculateDisplacement

private void calculateDisplacement()

getDistance

float getDistance(float[] a,
                  float[] b,
                  float scalex,
                  float scaley,
                  float scalez)

getWeight

float getWeight(int index)

getVertexWeights

public HashMap<Integer,Float> getVertexWeights()

appendContent

public StringBuilder appendContent(StringBuilder buf,
                                   XMLFormatting fmt)
Description copied from class: XMLStructureAdapter
Appends a String to buf that encodes the contents for the XML encoding. MUST BE OVERWRITTEN BY IMPLEMENTATIONS. (The default implementation appends nothing). The encoding should start on a new line, using indentation equal to tab. There should be no newline after the encoding.

Overrides:
appendContent in class XMLStructureAdapter

decodeContent

public void decodeContent(XMLTokenizer tokenizer)
                   throws IOException
Description copied from class: XMLStructureAdapter
decodes the XML contents, i.e. the XML between the STag and ETag of the encoding. MUST BE OVERWRITTEN BY IMPLEMENTATIONS.

Overrides:
decodeContent in class XMLStructureAdapter
Throws:
IOException