hmi.graphics.collada
Class ValueType

java.lang.Object
  extended by hmi.xml.XMLStructureAdapter
      extended by hmi.graphics.collada.ColladaElement
          extended by hmi.graphics.collada.ValueType
All Implemented Interfaces:
XMLStructure

public class ValueType
extends ColladaElement

ValueType defines a scalar, vector, or matrix.

Author:
Job Zwiers

Nested Class Summary
static class ValueType.BaseType
          A valuetype has a BaseType, like Int, Float etc
 
Field Summary
private  ValueType.BaseType baseType
           
private  boolean[] bools
           
private  float[] floats
           
private  int[] ints
           
private static int MAT1X1_SIZE
           
private static int MAT1X2_SIZE
           
private static int MAT1X3_SIZE
           
private static int MAT1X4_SIZE
           
private static int MAT2X1_SIZE
           
private static int MAT2X2_SIZE
           
private static int MAT2X3_SIZE
           
private static int MAT2X4_SIZE
           
private static int MAT3X1_SIZE
           
private static int MAT3X2_SIZE
           
private static int MAT3X3_SIZE
           
private static int MAT3X4_SIZE
           
private static int MAT4X1_SIZE
           
private static int MAT4X2_SIZE
           
private static int MAT4X3_SIZE
           
private static int MAT4X4_SIZE
           
private  int size
           
private  String string
           
private static int VEC2_SIZE
           
private static int VEC3_SIZE
           
private static int VEC4_SIZE
           
private  String xmlTag
          non-static XML tag value
private static Set<String> xmlTags
           
 
Fields inherited from class hmi.graphics.collada.ColladaElement
COLLADANAMESPACE
 
Fields inherited from class hmi.xml.XMLStructureAdapter
ATTRIBUTE_TOKEN_DELIMITERS, COMMA_SEPARATOR, DECODEDARRAYSIZE, DEFAULT_RECOVER_MODE, NEWLINE, SYSTEMNEWLINE, TAB, TAB_STRING
 
Constructor Summary
ValueType()
           
ValueType(Collada collada, XMLTokenizer tokenizer)
           
 
Method Summary
 StringBuilder appendContent(StringBuilder buf, XMLFormatting fmt)
          Appends a String to buf that encodes the contents for the XML encoding.
 void decodeContent(XMLTokenizer tokenizer)
          decodes the XML contents, i.e. the XML between the STag and ETag of the encoding.
 ValueType.BaseType getBaseType()
           
 boolean[] getBools()
           
 float[] getFloats()
           
 int[] getInts()
           
 int getSize()
           
 String getString()
           
 String getXMLTag()
          returns the XML Stag for XML encoding
static boolean hasTag(String tag)
          Returns whether tag is one of the ValueType tags
 
Methods inherited from class hmi.graphics.collada.ColladaElement
addColladaNode, addColladaNodes, addToIdMap, appendAttributes, decodeAttributes, getCollada, getColladaNodes, getId, getIdMap, getIdOrName, getIds, getName, getNamespace, getRecursiveColladaNodes, getRecursiveColladaNodes, getResources, getSid, report, reportNode, setCollada, setId, setName, setSid, urlToId
 
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, 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, 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, getOptionalAttribute, getOptionalAttribute, getOptionalBooleanAttribute, getOptionalDoubleAttribute, getOptionalFloatAttribute, getOptionalIntAttribute, getOptionalLongAttribute, getRequiredAttribute, getRequiredBooleanAttribute, getRequiredDoubleAttribute, getRequiredFloatAttribute, getRequiredIntAttribute, getRequiredLongAttribute, getTagLine, 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

bools

private boolean[] bools

ints

private int[] ints

floats

private float[] floats

string

private String string

size

private int size

baseType

private ValueType.BaseType baseType

VEC2_SIZE

private static final int VEC2_SIZE
See Also:
Constant Field Values

VEC3_SIZE

private static final int VEC3_SIZE
See Also:
Constant Field Values

VEC4_SIZE

private static final int VEC4_SIZE
See Also:
Constant Field Values

MAT1X1_SIZE

private static final int MAT1X1_SIZE
See Also:
Constant Field Values

MAT1X2_SIZE

private static final int MAT1X2_SIZE
See Also:
Constant Field Values

MAT1X3_SIZE

private static final int MAT1X3_SIZE
See Also:
Constant Field Values

MAT1X4_SIZE

private static final int MAT1X4_SIZE
See Also:
Constant Field Values

MAT2X1_SIZE

private static final int MAT2X1_SIZE
See Also:
Constant Field Values

MAT2X2_SIZE

private static final int MAT2X2_SIZE
See Also:
Constant Field Values

MAT2X3_SIZE

private static final int MAT2X3_SIZE
See Also:
Constant Field Values

MAT2X4_SIZE

private static final int MAT2X4_SIZE
See Also:
Constant Field Values

MAT3X1_SIZE

private static final int MAT3X1_SIZE
See Also:
Constant Field Values

MAT3X2_SIZE

private static final int MAT3X2_SIZE
See Also:
Constant Field Values

MAT3X3_SIZE

private static final int MAT3X3_SIZE
See Also:
Constant Field Values

MAT3X4_SIZE

private static final int MAT3X4_SIZE
See Also:
Constant Field Values

MAT4X1_SIZE

private static final int MAT4X1_SIZE
See Also:
Constant Field Values

MAT4X2_SIZE

private static final int MAT4X2_SIZE
See Also:
Constant Field Values

MAT4X3_SIZE

private static final int MAT4X3_SIZE
See Also:
Constant Field Values

MAT4X4_SIZE

private static final int MAT4X4_SIZE
See Also:
Constant Field Values

xmlTag

private String xmlTag
non-static XML tag value


xmlTags

private static Set<String> xmlTags
Constructor Detail

ValueType

public ValueType()

ValueType

public ValueType(Collada collada,
                 XMLTokenizer tokenizer)
          throws IOException
Throws:
IOException
Method Detail

getBaseType

public ValueType.BaseType getBaseType()

getSize

public int getSize()

getBools

public boolean[] getBools()

getInts

public int[] getInts()

getFloats

public float[] getFloats()

getString

public String getString()

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

getXMLTag

public String getXMLTag()
returns the XML Stag for XML encoding

Specified by:
getXMLTag in interface XMLStructure
Overrides:
getXMLTag in class XMLStructureAdapter

hasTag

public static boolean hasTag(String tag)
Returns whether tag is one of the ValueType tags