unc.cdva.graphics.models
Class Material

java.lang.Object
  extended by 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
 
Method Summary
 javax.vecmath.Vector3f getAmbient()
           
 float[] getAmbientFloats()
           
 javax.vecmath.Vector3f getDiffuse()
           
 float[] getDiffuseFloats()
           
 float getDissolve()
           
 java.lang.String getName()
           
 javax.vecmath.Vector3f getSpecular()
           
 float[] getSpecularFloats()
           
 void setAmbient(javax.vecmath.Vector3f ambient)
           
 void setDiffuse(javax.vecmath.Vector3f diffuse)
           
 void setDissolve(float dissolve)
           
 void setName(java.lang.String name)
           
 void setSpecular(javax.vecmath.Vector3f specular)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 material
diffuse - diffuse color of the material
specular - specular color of the material
dissolve - dissolve factor of the material
name - name of the material

Material

public Material()
Init an empty material object

Method Detail

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