Main Page   Namespace List   Class Hierarchy   Compound List   File List   Header Files   Namespace Members   Compound Members   File Members   Related Pages  

/msg/src/nodes/material.h

This is the verbatim text of the material.h include file.
/* -*- C++ -*-
 * material.h
 * $Id: material.h,v 1.2 2000/07/21 22:31:44 ghali Exp $
 */

#ifndef MATERIAL_H
#define MATERIAL_H

#include <GL/glut.h>
#include "node.h"
#include "../other/color.h"

namespace MSG {

  class Material : public Node {
  protected:

    Color ambient;
    Color diffuse;
    Color specular;
    Color emissivity;

    // The following duplicate the previous variables, but in a format
    // suitable for OpenGL
    GLfloat ambientMat[4];
    GLfloat diffuseMat[4];
    GLfloat specularMat[4];
    GLfloat emissivityMat[4];

  public:

    Material(const Color& _ambient  = Color::defaultAmbientMaterial,
             const Color& _diffuse  = Color::defaultDiffuseMaterial,
             const Color& _specular = Color::defaultSpecularMaterial,
             const Color& _emissivity = Color::defaultEmissivityMaterial);

    void issueGLcommands();

    virtual void render(std::vector<ActiveLight*>* &activelights,
                        std::vector<TransformGroup*> transforms);

    virtual bool handleEvent(Event* event);

  };
}
#endif

Generated at Sat Jul 22 00:32:16 2000 for MSG by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999