The Material Class

The Material Class

{The Material data type together with the Color data type, implements the Phong shading model in Computer Graphics. This class uses OpenGL to implement the model.

Note: If one does not understand the workings of and the Phong illumination model, this class may be hard to understand.

To Obtain the Class

To obtain the Material class you need both the include file Material.h and the source code file Material.C.

The user must also include the Color class for the Material class to operate correctly.

Make Sure to Also Include...

Be sure to include the following lines in your source code file, as these routines utilize them.

            #include <stdlib.h>
            #include <math.h>
            #include <stream.h>
            #include <GL/gl.h>
Also, if you wish to use UNIX commands (exevlp, system, sleep, etc.) in your program, you should also have
            #include <unistd.h>

This class was generated for a research system at UC Davis and has worked in a variety of situations. Unfortunately, this is not a guarantee that it will work in your situation. You may use it ``as is'' or can modify it. If you find errors, and can correct them, please send mail to the address below, as we would also like to know about them.



Ken Joy
Wed Jan 7 14:59:48 PST 1998