|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.xml.XMLStructureAdapter
hmi.graphics.scenegraph.GMaterial
public class GMaterial
A GMaterial defines the appearance, or material, for some GMesh Currently, this is just basic OpenGL material settings, like the ambient, diffus and specular color, and the specular shininess.
| Field Summary | |
|---|---|
private float[] |
ambientColor
|
private float[] |
diffuseColor
|
private GTexture |
diffuseTexture
|
private float[] |
emissionColor
|
private static int |
LIGHT_ATTRIBUTE_SIZE
|
private String |
name
The name of the material |
private float |
offsetS
|
private float |
offsetT
|
private String |
opaqueMode
|
private float |
repeatS
|
private boolean |
repeatSettingsTransferred
|
private float |
repeatT
|
private String |
shader
|
private float |
shininess
|
private float[] |
specularColor
|
private boolean |
transparencyEnabled
|
private GTexture |
transparentTexture
|
private static String |
XMLTAG
The XML Stag for XML encoding |
| Fields inherited from class hmi.xml.XMLStructureAdapter |
|---|
ATTRIBUTE_TOKEN_DELIMITERS, COMMA_SEPARATOR, DECODEDARRAYSIZE, DEFAULT_RECOVER_MODE, NEWLINE, SYSTEMNEWLINE, TAB, TAB_STRING |
| Constructor Summary | |
|---|---|
GMaterial()
|
|
GMaterial(String name)
|
|
GMaterial(XMLTokenizer tokenizer)
|
|
| Method Summary | |
|---|---|
StringBuilder |
appendAttributeString(StringBuilder buf,
XMLFormatting fmt)
appends the XML attributes 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 XML attributes. |
void |
decodeContent(XMLTokenizer tokenizer)
decodes the XML contents, i.e. the XML between the STag and ETag of the encoding. |
float[] |
getAmbientColor()
|
float[] |
getDiffuseColor()
|
GTexture |
getDiffuseTexture()
|
float[] |
getEmissionColor()
|
String |
getName()
|
float |
getOffsetS()
Returns the offset for the S coordinate |
float |
getOffsetT()
Returns the offset for the T coordinate |
String |
getOpaqueMode()
|
float |
getRepeatS()
Returns the repeat factor for the S coordinate |
float |
getRepeatT()
Returns the repeat factor for the T coordinate |
String |
getShader()
|
float |
getShininess()
|
float[] |
getSpecularColor()
|
GTexture |
getTransparentTexture()
|
String |
getXMLTag()
returns the XML Stag for XML encoding |
boolean |
hasContent()
returns whether the XML encoding should have an contents part, or should be an empty element tag. |
boolean |
isTransparencyEnabled()
|
void |
readBinary(DataInput dataIn)
|
void |
setAmbientColor(float[] ambientColor)
|
void |
setDiffuseColor(float[] diffuseColor)
|
void |
setDiffuseTexture(GTexture texture)
|
void |
setEmissionColor(float[] emissionColor)
|
void |
setName(String name)
|
void |
setOpaqueMode(String opaqueMode)
|
void |
setShader(String shader)
|
void |
setShininess(float shininess)
|
void |
setSpecularColor(float[] specularColor)
|
void |
setTransparencyEnabled(boolean mode)
|
void |
setTransparentTexture(GTexture texture)
|
String |
transferRepeatSettings(GTexture gtex)
|
void |
writeBinary(DataOutput dataOut)
|
static String |
xmlTag()
The XML Stag for XML encoding of this Class |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private String name
private float[] emissionColor
private float[] ambientColor
private float[] diffuseColor
private float[] specularColor
private float shininess
private String shader
private GTexture diffuseTexture
private GTexture transparentTexture
private String opaqueMode
private boolean transparencyEnabled
private float repeatS
private float repeatT
private float offsetS
private float offsetT
private boolean repeatSettingsTransferred
private static final int LIGHT_ATTRIBUTE_SIZE
private static final String XMLTAG
| Constructor Detail |
|---|
public GMaterial()
public GMaterial(String name)
public GMaterial(XMLTokenizer tokenizer)
throws IOException
IOException| Method Detail |
|---|
public void setName(String name)
public String getName()
public void setShader(String shader)
public String getShader()
public void setEmissionColor(float[] emissionColor)
public float[] getEmissionColor()
public void setAmbientColor(float[] ambientColor)
public float[] getAmbientColor()
public void setDiffuseColor(float[] diffuseColor)
public float[] getDiffuseColor()
public void setSpecularColor(float[] specularColor)
public float[] getSpecularColor()
public void setShininess(float shininess)
public float getShininess()
public void setDiffuseTexture(GTexture texture)
public GTexture getDiffuseTexture()
public void setTransparencyEnabled(boolean mode)
public boolean isTransparencyEnabled()
public void setTransparentTexture(GTexture texture)
public GTexture getTransparentTexture()
public void setOpaqueMode(String opaqueMode)
public String getOpaqueMode()
public String transferRepeatSettings(GTexture gtex)
public float getRepeatS()
public float getRepeatT()
public float getOffsetS()
public float getOffsetT()
public StringBuilder appendAttributeString(StringBuilder buf,
XMLFormatting fmt)
appendAttributeString in class XMLStructureAdapter
public void decodeAttributes(HashMap<String,String> attrMap,
XMLTokenizer tokenizer)
decodeAttributes in class XMLStructureAdapter
public StringBuilder appendContent(StringBuilder buf,
XMLFormatting fmt)
XMLStructureAdapter
appendContent in class XMLStructureAdapter
public void decodeContent(XMLTokenizer tokenizer)
throws IOException
XMLStructureAdapter
decodeContent in class XMLStructureAdapterIOExceptionpublic boolean hasContent()
XMLStructureAdapter
hasContent in class XMLStructureAdapterpublic static String xmlTag()
public String getXMLTag()
getXMLTag in interface XMLStructuregetXMLTag in class XMLStructureAdapter
public void writeBinary(DataOutput dataOut)
throws IOException
IOException
public void readBinary(DataInput dataIn)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||