Class: Material

Material() → {Material}

Simple Phong illumination model material: Ka, Kd, Ks, and Shininess

Found in Chapter 8, page 465 of the textbook

Example: 8.5 Materials and Specularity

Constructor

new Material() → {Material}

Source:
Returns:
a new Material instance
Type
Material

Methods

getAmbient() → {vec4}

Returns the ambient light coefficient vector for this Material
Source:
Returns:
mKa - ambient light coefficient vector
Type
vec4

getDiffuse() → {vec4}

Returns the light diffusion coefficient vector for this Material
Source:
Returns:
mKd - light diffusion coefficient vector
Type
vec4

getShininess() → {vec4}

Returns the shininess coefficient vector for this Material
Source:
Returns:
mShininess - shininess coefficient vector
Type
vec4

getSpecular() → {vec4}

Returns the specular reflection coefficient vector for this Material
Source:
Returns:
mKs - specular reflection coefficient vector
Type
vec4

setAmbient(a)

Set the ambient light coefficient vector for this Material
Parameters:
Name Type Description
a vec4 new ambient light coefficient vector
Source:

setDiffuse(d)

Set the light diffusion coefficient vector for this Material
Parameters:
Name Type Description
d vec4 new light diffusion coefficient vector
Source:

setShininess(s)

Set the shininess coefficient vector for this Material
Parameters:
Name Type Description
s vec4 new shininess coefficient vector
Source:

setSpecular(s)

Set the specular reflection coefficient vector for this Material
Parameters:
Name Type Description
s vec4 new specular reflection coefficient vector
Source: