hmi.graphics.collada
Class FixedFunctionShader

java.lang.Object
  extended by hmi.xml.XMLStructureAdapter
      extended by hmi.graphics.collada.ColladaElement
          extended by hmi.graphics.collada.FixedFunctionShader
All Implemented Interfaces:
XMLStructure
Direct Known Subclasses:
Blinn, Constant, Lambert, Phong

public class FixedFunctionShader
extends ColladaElement

Shared implementation of FixedFunctionShader for standard Collada and Collada-FX Base class for Phong, Blinn, Lambert, and Constant

Author:
Job Zwiers

Nested Class Summary
static class FixedFunctionShader.ShaderType
          A FixedFunction shader has one of the well known types, like Lambert, Phong, Blinn
 
Field Summary
private  Ambient ambient
           
private  Diffuse diffuse
           
private  Emission emission
           
private  IndexOfRefraction indexOfRefraction
           
private  Reflective reflective
           
private  Reflectivity reflectivity
           
private  FixedFunctionShader.ShaderType shaderType
           
private  Shininess shininess
           
private  Specular specular
           
private  Transparency transparency
           
private  Transparent transparent
           
 
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
FixedFunctionShader()
           
FixedFunctionShader(Collada collada, FixedFunctionShader.ShaderType type)
           
FixedFunctionShader(FixedFunctionShader.ShaderType type)
           
 
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.
 float[] getAmbientColor(Map<String,ParamValue> paramDefs)
           
 float[] getDiffuseColor(Map<String,ParamValue> paramDefs)
           
 CommonTexture getDiffuseTexture()
           
 float[] getEmissionColor(Map<String,ParamValue> paramDefs)
           
 float getIndexOfRefraction()
           
 String getOpaqueMode()
           
 float[] getReflectiveColor(Map<String,ParamValue> paramDefs)
           
 float getReflectivity()
           
 FixedFunctionShader.ShaderType getShaderType()
           
 float getShininess()
           
 float[] getSpecularColor(Map<String,ParamValue> paramDefs)
           
 float getTransparency()
           
 float[] getTransparentColor()
           
 float[] getTransparentColor(Map<String,ParamValue> paramDefs)
           
 CommonTexture getTransparentTexture()
           
 boolean isTransparencyEnabled()
           
 
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, 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

emission

private Emission emission

ambient

private Ambient ambient

diffuse

private Diffuse diffuse

specular

private Specular specular

reflective

private Reflective reflective

transparent

private Transparent transparent

shininess

private Shininess shininess

reflectivity

private Reflectivity reflectivity

transparency

private Transparency transparency

indexOfRefraction

private IndexOfRefraction indexOfRefraction

shaderType

private FixedFunctionShader.ShaderType shaderType
Constructor Detail

FixedFunctionShader

public FixedFunctionShader()

FixedFunctionShader

public FixedFunctionShader(FixedFunctionShader.ShaderType type)

FixedFunctionShader

public FixedFunctionShader(Collada collada,
                           FixedFunctionShader.ShaderType type)
Method Detail

getShaderType

public FixedFunctionShader.ShaderType getShaderType()

getEmissionColor

public float[] getEmissionColor(Map<String,ParamValue> paramDefs)

getAmbientColor

public float[] getAmbientColor(Map<String,ParamValue> paramDefs)

getDiffuseColor

public float[] getDiffuseColor(Map<String,ParamValue> paramDefs)

getDiffuseTexture

public CommonTexture getDiffuseTexture()

getSpecularColor

public float[] getSpecularColor(Map<String,ParamValue> paramDefs)

getReflectiveColor

public float[] getReflectiveColor(Map<String,ParamValue> paramDefs)

isTransparencyEnabled

public boolean isTransparencyEnabled()

getTransparentColor

public float[] getTransparentColor()

getTransparentColor

public float[] getTransparentColor(Map<String,ParamValue> paramDefs)

getTransparentTexture

public CommonTexture getTransparentTexture()

getOpaqueMode

public String getOpaqueMode()

getShininess

public float getShininess()

getReflectivity

public float getReflectivity()

getTransparency

public float getTransparency()

getIndexOfRefraction

public float getIndexOfRefraction()

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