home *** CD-ROM | disk | FTP | other *** search
- //**********************************************************************
- // DIVE Laboratories, Inc.
- // Copyright(c) 1995
- // All rights reserved
- // FILE: MATERIAL.HPP
- //
- // DESCRIPTION
- // This file provides the function prototypes for the materialClass
- //
- // Author: M. Doucet
- //
- // Modification History:
- // 6/13/95 Created
- //
- //**********************************************************************
- #ifndef _MATERIAL_HPP
- #define _MATERIAL_HPP
-
- #include "stack.hpp"
- #include "vrtypes.hpp"
-
- class amberClass;
-
- typedef enum {_AMBIENT, _DIFFUSE, _SPECULAR, _EMISSIVE} materialEnumType;
- class materialClass {
-
- friend class geometryPrivateClass;
- friend class geometryClass;
- friend class renderStateClass;
- friend class channelClass;
- friend class universeClass;
- friend class amberClass;
-
- private:
-
- F4 ambient;
- F4 diffuse;
- F4 specular;
- F4 emissive;
-
- char name[255];
- flagType vrmlSaved;
-
- void pushMaterial();
- void popMaterial();
- void makeCurrent();
-
- float shininess;
-
- static stackClass stack;
- static F4 curAmbient;
- static F4 curDiffuse;
- static F4 curSpecular;
- static F4 curEmissive;
- static float curShininess;
-
- public:
-
- static int stackIsEmpty;
- void setComponentV(materialEnumType component, F4 vals);
- void getComponentV(materialEnumType component, F4 vals);
- void setComponentV(materialEnumType component, D4 vals);
- void getComponentV(materialEnumType component, D4 vals);
- void setShiny(float val);
- float getShiny();
- void reset();
-
- void setName(char *nm);
- char *getName();
-
- void operator=(materialClass *mat);
-
- materialClass();
- ~materialClass();
- };
-
- #endif
-
-