hmi.graphics.collada
Class PrimitiveMeshElement

java.lang.Object
  extended by hmi.xml.XMLStructureAdapter
      extended by hmi.graphics.collada.ColladaElement
          extended by hmi.graphics.collada.PrimitiveMeshElement
All Implemented Interfaces:
XMLStructure
Direct Known Subclasses:
Lines, LineStrips, Polygons, PolyList, Triangles, Trifans, Tristrips

public class PrimitiveMeshElement
extends ColladaElement

PrimitiveMeshElement is the super class for Lines, LineStrips, Polygons, PolyList, Triangles, TriFans, and TriStrips.

Author:
Job Zwiers

Field Summary
private  int count
           
private  ArrayList<Extra> extras
           
private  int indexArrayLength
           
private  int[][] indices
           
private  ArrayList<Input> inputs
           
private  String material
           
private  int maxOffset
           
private  Mesh.MeshType meshType
           
private  int nrOfOffsets
           
 
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
PrimitiveMeshElement()
           
PrimitiveMeshElement(Collada collada)
           
 
Method Summary
 void allocateIndices(int nrOfOffsets, int indexArrayLength)
          Allocates a new array of index arrays
 StringBuilder appendAttributes(StringBuilder buf)
          appends a String of attributes to buf.
 void createIndexArrays()
           
 void decodeAttributes(HashMap<String,String> attrMap, XMLTokenizer tokenizer)
          decodes the XML attributes
 int getCount()
          Return count
 ArrayList<Extra> getExtras()
          Return extras
 int getIndexArrayLength()
          Return indexArrayLength
 int[] getIndices(int offset)
          Returns an array with indices, corresponding to a specified Collada offset value, used for Input elements.
 ArrayList<Input> getInputs()
           
 String getMaterialId()
          Return material
 int getMaxOffset()
          Return maxOffset
 Mesh.MeshType getMeshType()
          Return meshType
 int getNrOfOffsets()
          Return nrOfOffsets
 void setIndexArrayLength(int indexArrayLength)
          Set indexArrayLength
 void setMaxOffset(int maxOffset)
          Set maxOffset
 void setMeshType(Mesh.MeshType meshType)
          Set meshType
 void setNrOfOffsets(int nrOfOffsets)
          Set nrOfOffsets
 
Methods inherited from class hmi.graphics.collada.ColladaElement
addColladaNode, addColladaNodes, addToIdMap, 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, 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, decodeContent, 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, 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

count

private int count

material

private String material

maxOffset

private int maxOffset

nrOfOffsets

private int nrOfOffsets

indices

private int[][] indices

indexArrayLength

private int indexArrayLength

inputs

private ArrayList<Input> inputs

extras

private ArrayList<Extra> extras

meshType

private Mesh.MeshType meshType
Constructor Detail

PrimitiveMeshElement

public PrimitiveMeshElement()

PrimitiveMeshElement

public PrimitiveMeshElement(Collada collada)
Method Detail

getCount

public int getCount()
Return count


getMaxOffset

public int getMaxOffset()
Return maxOffset


setMaxOffset

public void setMaxOffset(int maxOffset)
Set maxOffset


getNrOfOffsets

public int getNrOfOffsets()
Return nrOfOffsets


setNrOfOffsets

public void setNrOfOffsets(int nrOfOffsets)
Set nrOfOffsets


getInputs

public ArrayList<Input> getInputs()

getMeshType

public Mesh.MeshType getMeshType()
Return meshType


setMeshType

public void setMeshType(Mesh.MeshType meshType)
Set meshType


getIndexArrayLength

public int getIndexArrayLength()
Return indexArrayLength


setIndexArrayLength

public void setIndexArrayLength(int indexArrayLength)
Set indexArrayLength


getIndices

public int[] getIndices(int offset)
Returns an array with indices, corresponding to a specified Collada offset value, used for Input elements. The indices themselves are extracted from the Collada P element for this PrimitiveMeshElement.


allocateIndices

public void allocateIndices(int nrOfOffsets,
                            int indexArrayLength)
Allocates a new array of index arrays


getExtras

public ArrayList<Extra> getExtras()
Return extras


getMaterialId

public String getMaterialId()
Return material


appendAttributes

public StringBuilder appendAttributes(StringBuilder buf)
appends a String of attributes to buf.

Overrides:
appendAttributes in class ColladaElement

decodeAttributes

public void decodeAttributes(HashMap<String,String> attrMap,
                             XMLTokenizer tokenizer)
decodes the XML attributes

Overrides:
decodeAttributes in class ColladaElement

createIndexArrays

public void createIndexArrays()