Class Material

java.lang.Object
  extended by Material

public class Material
extends java.lang.Object

Represents information about the specular properties of a surface, including how reflective or refractive the surface is.


Field Summary
static Material BLACK_PLASTIC
           
static Material BRASS
           
static Material GLASS
           
static Material GOLD
           
static Material SILVER
           
static Material WHITE_PLASTIC
           
 
Constructor Summary
Material()
           
 
Method Summary
 Color getColor(double ambAmt, double diffAmt, double specAmt)
          Returns the color of this surface given the amount of ambient, diffuse, and specular light computed to fall on the surface.
 ColorVector getReflectivity()
          Returns a color vector representing how reflective this material is for the three color components.
 double getRefractiveIndex()
          Returns this material's refractive index, a number between 0.0 and 1.0, with a vacuum being 1.0.
 ColorVector getRefractivity()
          Returns a color vector representing how refractive this material is for the three color components.
 double getSpecularExponent()
          Returns this material's specular exponent, as per Blinn's alternative to the Phong model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BRASS

public static final Material BRASS

GOLD

public static final Material GOLD

SILVER

public static final Material SILVER

BLACK_PLASTIC

public static final Material BLACK_PLASTIC

WHITE_PLASTIC

public static final Material WHITE_PLASTIC

GLASS

public static final Material GLASS
Constructor Detail

Material

public Material()
Method Detail

getReflectivity

public ColorVector getReflectivity()
Returns a color vector representing how reflective this material is for the three color components.


getRefractivity

public ColorVector getRefractivity()
Returns a color vector representing how refractive this material is for the three color components.


getRefractiveIndex

public double getRefractiveIndex()
Returns this material's refractive index, a number between 0.0 and 1.0, with a vacuum being 1.0.


getSpecularExponent

public double getSpecularExponent()
Returns this material's specular exponent, as per Blinn's alternative to the Phong model.


getColor

public Color getColor(double ambAmt,
                      double diffAmt,
                      double specAmt)
Returns the color of this surface given the amount of ambient, diffuse, and specular light computed to fall on the surface.