Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/importer/material.h @ 3454

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

orxonox/trunk/importer: doxygen-tags

File size: 2.2 KB
RevLine 
[2842]1/*!
2  \file material.h
3  \brief Contains the Material Class that handles Material for 3D-Objects.
[3186]4  \todo free SDL-surface when deleting Material.
5  \todo delete imgNameWithPath after use creation.
[2842]6*/
7
[2776]8#ifndef _MATERIAL_H
9#define _MATERIAL_H
[2804]10
[3186]11
12
[2842]13extern int verbose; //!< will be obsolete soon.
[2804]14
[3140]15#if HAVE_CONFIG_H
16#include <config.h> 
17#endif /* HAVE_CONFIG_H */
18
[3427]19// FORWARD DEFINITIONS //
20class Texture;
[3140]21
[3186]22
[2842]23//! Class to handle Materials.
[2776]24class Material
25{
26 public:
27  Material ();
28  Material (char* mtlName);
[2778]29  Material* addMaterial(char* mtlName);
[3140]30  ~Material ();
[2776]31  void init(void);
[2778]32
[3454]33  Material* search(char* mtlName);
[3140]34  bool select (void);
[2778]35
[2776]36  void setName (char* mtlName);
[2778]37  char* getName (void);
[2776]38  void setIllum (int illum);
39  void setIllum (char* illum);
40  void setDiffuse (float r, float g, float b);
41  void setDiffuse (char* rgb);
42  void setAmbient (float r, float g, float b);
43  void setAmbient (char* rgb);
44  void setSpecular (float r, float g, float b);
45  void setSpecular (char* rgb);
[2836]46  void setShininess (float shini);
47  void setShininess (char* shini);
[2776]48  void setTransparency (float trans);
49  void setTransparency (char* trans);
50
[3140]51
52 
53  void addTexturePath(char* pathName);
54 // MAPPING //
[3070]55  void setDiffuseMap(char* dMap);
56  void setAmbientMap(char* aMap);
57  void setSpecularMap(char* sMap);
58  void setBump(char* bump);
59
[3140]60 private:
[3186]61  char* name;        //!< The Name of the Material.
62  int illumModel;    //!< The IlluminationModel is either flat or smooth.
63  float diffuse [4]; //!< The diffuse color of the Material.
64  float ambient [4]; //!< The ambient color of the Material.
65  float specular [4];//!< The specular color of the Material.
66  float shininess;   //!< The shininess of the Material.
67  float transparency;//!< The transperency of the Material.
[2776]68
[3365]69  Texture* diffuseTexture; //!< The diffuse texture of the Material.
70  Texture* ambientTexture; //!< The ambient texture of the Material.
71  Texture* specularTexture;//!< The specular texture of the Material.
[3140]72 
[3186]73  bool diffuseTextureSet; //!< Chekcs if the diffuse texture is Set.
74  bool ambientTextureSet; //!< Chekcs if the ambient texture is Set.
75  bool specularTextureSet;//!< Chekcs if the specular texture is Set.
[3140]76
77  Material* nextMat; //!< pointer to the Next Material of the List. NULL if no next exists.
78
79
[2776]80};
81#endif
Note: See TracBrowser for help on using the repository browser.