unc.cdva.graphics.models
Class Material
java.lang.Object
unc.cdva.graphics.models.Material
public class Material
- extends java.lang.Object
Stores the material properties of the faces of the
objects. Includes ambient, diffuse and specular color and
dissolve factor
- Author:
- Guillaume Conte
|
Constructor Summary |
Material()
Init an empty material object |
Material(javax.vecmath.Vector3f ambient,
javax.vecmath.Vector3f diffuse,
javax.vecmath.Vector3f specular,
float dissolve,
java.lang.String name)
Init a material object |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Material
public Material(javax.vecmath.Vector3f ambient,
javax.vecmath.Vector3f diffuse,
javax.vecmath.Vector3f specular,
float dissolve,
java.lang.String name)
- Init a material object
- Parameters:
ambient - ambient color of the materialdiffuse - diffuse color of the materialspecular - specular color of the materialdissolve - dissolve factor of the materialname - name of the material
Material
public Material()
- Init an empty material object
getAmbient
public javax.vecmath.Vector3f getAmbient()
- Returns:
- Returns the ambient.
getDiffuse
public javax.vecmath.Vector3f getDiffuse()
- Returns:
- Returns the diffuse.
getDissolve
public float getDissolve()
- Returns:
- Returns the dissolve.
getName
public java.lang.String getName()
- Returns:
- Returns the name.
getSpecular
public javax.vecmath.Vector3f getSpecular()
- Returns:
- Returns the specular.
setAmbient
public void setAmbient(javax.vecmath.Vector3f ambient)
- Parameters:
ambient - The ambient to set.
setDiffuse
public void setDiffuse(javax.vecmath.Vector3f diffuse)
- Parameters:
diffuse - The diffuse to set.
setDissolve
public void setDissolve(float dissolve)
- Parameters:
dissolve - The dissolve to set.
setName
public void setName(java.lang.String name)
- Parameters:
name - The name to set.
setSpecular
public void setSpecular(javax.vecmath.Vector3f specular)
- Parameters:
specular - The specular to set.
getAmbientFloats
public float[] getAmbientFloats()
- Returns:
- ambient color as an array of floats
getDiffuseFloats
public float[] getDiffuseFloats()
- Returns:
- diffuse color as an array of floats
getSpecularFloats
public float[] getSpecularFloats()
- Returns:
- specular color as an array of floats