Last change
on this file since 3109 was
2964,
checked in by bensch, 20 years ago
|
orxonox/branches/sound: merged Trunk back into sound. and included all headers for real into the configure.ac-script.
|
File size:
1.2 KB
|
Rev | Line | |
---|
[2842] | 1 | /*! |
---|
| 2 | \file material.h |
---|
| 3 | \brief Contains the Material Class that handles Material for 3D-Objects. |
---|
| 4 | */ |
---|
| 5 | |
---|
[2776] | 6 | #ifndef _MATERIAL_H |
---|
| 7 | #define _MATERIAL_H |
---|
[2804] | 8 | |
---|
[2842] | 9 | extern int verbose; //!< will be obsolete soon. |
---|
[2804] | 10 | |
---|
[2776] | 11 | #include <GL/gl.h> |
---|
| 12 | #include <GL/glu.h> |
---|
| 13 | #include <stdlib.h> |
---|
[2823] | 14 | #include <fstream> |
---|
[2776] | 15 | |
---|
[2842] | 16 | //! Class to handle Materials. |
---|
[2776] | 17 | class Material |
---|
| 18 | { |
---|
| 19 | public: |
---|
| 20 | Material (); |
---|
| 21 | Material (char* mtlName); |
---|
[2778] | 22 | Material* addMaterial(char* mtlName); |
---|
| 23 | |
---|
[2776] | 24 | void init(void); |
---|
| 25 | ~Material (); |
---|
[2778] | 26 | |
---|
| 27 | |
---|
[2776] | 28 | void setName (char* mtlName); |
---|
[2778] | 29 | char* getName (void); |
---|
[2776] | 30 | void setIllum (int illum); |
---|
| 31 | void setIllum (char* illum); |
---|
| 32 | void setDiffuse (float r, float g, float b); |
---|
| 33 | void setDiffuse (char* rgb); |
---|
| 34 | void setAmbient (float r, float g, float b); |
---|
| 35 | void setAmbient (char* rgb); |
---|
| 36 | void setSpecular (float r, float g, float b); |
---|
| 37 | void setSpecular (char* rgb); |
---|
[2836] | 38 | void setShininess (float shini); |
---|
| 39 | void setShininess (char* shini); |
---|
[2776] | 40 | void setTransparency (float trans); |
---|
| 41 | void setTransparency (char* trans); |
---|
| 42 | |
---|
[2778] | 43 | Material* search (char* mtlName); |
---|
[2776] | 44 | |
---|
| 45 | bool select (void); |
---|
| 46 | |
---|
[2842] | 47 | Material* nextMat; //!< pointer to the Next Material of the List. NULL if no next exists. |
---|
[2778] | 48 | |
---|
[2776] | 49 | private: |
---|
[2778] | 50 | char name [50]; |
---|
[2776] | 51 | int illumModel; |
---|
[2780] | 52 | float diffuse [4]; |
---|
| 53 | float ambient [4]; |
---|
| 54 | float specular [4]; |
---|
[2836] | 55 | float shininess; |
---|
[2776] | 56 | float transparency; |
---|
| 57 | |
---|
| 58 | }; |
---|
| 59 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.