Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/graphics/importer/material.h @ 4466

Last change on this file since 4466 was 4466, checked in by bensch, 19 years ago

orxonox/trunk: doxygen-tags

File size: 2.0 KB
Line 
1/*!
2  \file material.h
3  \brief Contains the Material Class that handles Material for 3D-Objects.
4  \todo free SDL-surface when deleting Material.
5  \todo delete imgNameWithPath after use creation.
6*/
7
8#ifndef _MATERIAL_H
9#define _MATERIAL_H
10
11
12#if HAVE_CONFIG_H
13#include <config.h> 
14#endif /* HAVE_CONFIG_H */
15
16#ifndef NULL
17#define NULL 0            //!< a pointer to NULL
18#endif
19
20// FORWARD DEFINITIONS //
21class Texture;
22
23//! Class to handle Materials.
24class Material
25{
26 public:
27  Material (const char* mtlName = NULL);
28  ~Material ();
29
30  bool select (void);
31
32  void setName (const char* mtlName);
33  char* getName (void);
34  void setIllum (int illum);
35  void setIllum (char* illum);
36  void setDiffuse (float r, float g, float b);
37  void setDiffuse (char* rgb);
38  void setAmbient (float r, float g, float b);
39  void setAmbient (char* rgb);
40  void setSpecular (float r, float g, float b);
41  void setSpecular (char* rgb);
42  void setShininess (float shini);
43  void setShininess (char* shini);
44  void setTransparency (float trans);
45  void setTransparency (char* trans);
46
47 // MAPPING //
48  void setDiffuseMap(const char* dMap);
49  void setAmbientMap(const char* aMap);
50  void setSpecularMap(const char* sMap);
51  void setBump(const char* bump);
52
53  static void addTexturePath(const char* pathName);
54
55 private:
56  char*       name;             //!< The Name of the Material.
57  int         illumModel;       //!< The IlluminationModel is either flat or smooth.
58  float       diffuse [4];      //!< The diffuse color of the Material.
59  float       ambient [4];      //!< The ambient color of the Material.
60  float       specular [4];     //!< The specular color of the Material.
61  float       shininess;        //!< The shininess of the Material.
62  float       transparency;     //!< The transperency of the Material.
63
64  Texture*    diffuseTexture;   //!< The diffuse texture of the Material.
65  Texture*    ambientTexture;   //!< The ambient texture of the Material.
66  Texture*    specularTexture;  //!< The specular texture of the Material.
67};
68#endif
Note: See TracBrowser for help on using the repository browser.