hmi.graphics.scenegraph
Class GShape

java.lang.Object
  extended by hmi.xml.XMLStructureAdapter
      extended by hmi.graphics.scenegraph.GShape
All Implemented Interfaces:
XMLStructure

public class GShape
extends XMLStructureAdapter

A GShape combines a GMesh and a GMaterial.

Author:
Job Zwiers

Field Summary
private  GMaterial gmaterial
           
private  GMesh gmesh
           
private  String name
           
private static String XMLTAG
           
 
Fields inherited from class hmi.xml.XMLStructureAdapter
ATTRIBUTE_TOKEN_DELIMITERS, COMMA_SEPARATOR, DECODEDARRAYSIZE, DEFAULT_RECOVER_MODE, NEWLINE, SYSTEMNEWLINE, TAB, TAB_STRING
 
Constructor Summary
GShape()
          Creates a new GShape.
GShape(GMesh gmesh, GMaterial gmaterial, String name)
          Creates a new GShape with specified GMesh and GMaterial.
GShape(XMLTokenizer tokenizer)
          Recreate a GShape from XML
 
Method Summary
 void affineTransform(float[] mat4x4)
           
 StringBuilder appendAttributes(StringBuilder buf)
          appends the (optional) name attribute to buf.
 StringBuilder appendContent(StringBuilder buf, XMLFormatting fmt)
          Appends a String to buf that encodes the contents for the XML encoding.
 void decodeAttributes(HashMap<String,String> attrMap, XMLTokenizer tokenizer)
          decodes the name XML attribute.
 void decodeContent(XMLTokenizer tokenizer)
          decodes the XML contents, i.e. the XML between the STag and ETag of the encoding.
 GMaterial getGMaterial()
          Returns the GMaterial component.
 GMesh getGMesh()
          Returns the GMesh component.
 String getName()
          Returns the name.
 String getXMLTag()
          returns the XML Stag for XML encoding
 void setGMaterial(GMaterial gmaterial)
          Sets the GMaterial component.
 void setGMesh(GMesh gmesh)
          Sets the GMesh component.
 void setName(String name)
          Sets the name.
static String xmlTag()
          The XML Stag for XML encoding
 
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, getNamespace, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

gmesh

private GMesh gmesh

gmaterial

private GMaterial gmaterial

name

private String name

XMLTAG

private static final String XMLTAG
See Also:
Constant Field Values
Constructor Detail

GShape

public GShape()
Creates a new GShape.


GShape

public GShape(GMesh gmesh,
              GMaterial gmaterial,
              String name)
Creates a new GShape with specified GMesh and GMaterial.


GShape

public GShape(XMLTokenizer tokenizer)
       throws IOException
Recreate a GShape from XML

Throws:
IOException
Method Detail

setGMesh

public void setGMesh(GMesh gmesh)
Sets the GMesh component.


getGMesh

public GMesh getGMesh()
Returns the GMesh component.


setGMaterial

public void setGMaterial(GMaterial gmaterial)
Sets the GMaterial component.


getGMaterial

public GMaterial getGMaterial()
Returns the GMaterial component.


setName

public void setName(String name)
Sets the name.


getName

public String getName()
Returns the name.


affineTransform

public void affineTransform(float[] mat4x4)

appendAttributes

public StringBuilder appendAttributes(StringBuilder buf)
appends the (optional) name attribute to buf.

Overrides:
appendAttributes in class XMLStructureAdapter

decodeAttributes

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

Overrides:
decodeAttributes in class XMLStructureAdapter

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

xmlTag

public static String xmlTag()
The XML Stag for XML encoding


getXMLTag

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

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