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

Checker Class Reference

Checkerboard material. More...

#include <checker.h>

Inherits Material.

Inheritance diagram for Checker:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Checker (Material *m1, Material *m2, int nu, int nv)
 Constructs a checkerboard material consisting of two sub-materials, one for odd and one for even squares.
virtual ~Checker ()
 Destructor.
Color getBRDF (const Intersection &is, const Vector &L)
 Returns the BRDF at the intersection is for the light direction L.
float getReflectivity (const Intersection &is) const
 Returns the reflectivity of the material in the range [0,1], where 0 means not reflective at all, and 1 gives a perfect mirror.
float getTransparency (const Intersection &is) const
 Returns the transparency of the material in the range [0,1], where 0 is fully opaque, and 1 is fully transparent.
virtual void setReflectivity (float r)
 Sets the reflectivity of the material.
virtual void setTransparency (float t)
 Sets the transparency of the material.

Protected Member Functions

int getType (const Intersection &is) const
 Returns the type of the checker at the intersection point, 0 or 1, where 0 is even squares and 1 is odd.

Protected Attributes

MaterialmMat [2]
 The two materials.
int mNumU
 Number of squares along u.
int mNumV
 Number of squares along v.
float mReflectivity
 The reflectivity of the material.
float mTransparency
 The transparency of the material.

Detailed Description

Checkerboard material.

This material takes two materials, and alternately chooses between them based on the texture coordinates.


The documentation for this class was generated from the following files:
Generated on Tue Mar 14 09:46:36 2006 for ASR by  doxygen 1.4.4