Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

Phong Class Reference

Class representing a simple phong material. More...

#include <phong.h>

Inherits Material.

Inheritance diagram for Phong:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Phong (const Color &d, const Color &s, float e, float r=0.0f, float t=0.0f, float n=1.0f)
 Constructs a Phong material with diffuse color d, specular color s, and exponent (shininess) e, and (optionally) reflectivity r and transparency t, and index of refraction n.
virtual ~Phong ()
 Destructor.
Color getBRDF (const Intersection &is, const Vector &L)
 Returns the BRDF at the intersection is for the light direction L.
virtual float getReflectivity (const Intersection &is) const
 Returns the reflectivity of the material in the range [0,1] at the intersection, where 0 means not reflective at all, and 1 gives a perfect mirror.
virtual void setReflectivity (float r)
 Sets the reflectivity of the material.
virtual float getTransparency (const Intersection &is) const
 Returns the transparency of the material in the range [0,1] at the intersection, where 0 is fully opaque, and 1 is fully transparent.
virtual void setTransparency (float t)
 Sets the transparency of the material.
virtual float getIndexOfRefraction () const
 Returns the index of refraction for the material.
virtual void setIndexOfRefraction (float n)
 Sets the index of refraction. Empty space is 1, denser materials higher.

Protected Attributes

Color mDiffColor
 The diffuse color.
Color mSpecColor
 The specular color.
float mExponent
 The Phong exponent (shininess).
float mReflectivity
 The reflectivity of the material.
float mTransparency
 The transparency of the material.
float mRefractionIndex
 Index of refraction for the material.

Detailed Description

Class representing a simple phong material.

The BRDF is computed at an intersection point by evaluating Phong's shading model. The material has a diffuse and a specular component, which can have different colors. The phong exponent specifies the amount of shininess, ranging from perfectly diffuse to highly specular.


The documentation for this class was generated from the following files:
Generated on Sun Mar 26 19:14:15 2006 for ASR by  doxygen 1.4.4