Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/movie_player/src/lib/graphics/importer/material.h @ 4217

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

orxonox/branches/movie_player: merged the trunk back into the movie_player
merged with command:
svn merge -r 4014:HEAD ../trunk/ movie_player/
no conflicts

File size: 1.9 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
[3140]12#if HAVE_CONFIG_H
13#include <config.h> 
14#endif /* HAVE_CONFIG_H */
15
[3894]16#ifndef NULL
17#define NULL 0
18#endif
19
[3427]20// FORWARD DEFINITIONS //
21class Texture;
[3140]22
[3186]23
[2842]24//! Class to handle Materials.
[2776]25class Material
26{
27 public:
[3894]28  Material (const char* mtlName = NULL);
[3140]29  ~Material ();
[2778]30
[3140]31  bool select (void);
[2778]32
[3894]33  void setName (const char* mtlName);
[2778]34  char* getName (void);
[2776]35  void setIllum (int illum);
36  void setIllum (char* illum);
37  void setDiffuse (float r, float g, float b);
38  void setDiffuse (char* rgb);
39  void setAmbient (float r, float g, float b);
40  void setAmbient (char* rgb);
41  void setSpecular (float r, float g, float b);
42  void setSpecular (char* rgb);
[2836]43  void setShininess (float shini);
44  void setShininess (char* shini);
[2776]45  void setTransparency (float trans);
46  void setTransparency (char* trans);
47
[3140]48
49 
50  void addTexturePath(char* pathName);
51 // MAPPING //
[3803]52  void setDiffuseMap(const char* dMap);
53  void setAmbientMap(const char* aMap);
54  void setSpecularMap(const char* sMap);
55  void setBump(const char* bump);
[3070]56
[3140]57 private:
[3186]58  char* name;        //!< The Name of the Material.
59  int illumModel;    //!< The IlluminationModel is either flat or smooth.
60  float diffuse [4]; //!< The diffuse color of the Material.
61  float ambient [4]; //!< The ambient color of the Material.
62  float specular [4];//!< The specular color of the Material.
63  float shininess;   //!< The shininess of the Material.
64  float transparency;//!< The transperency of the Material.
[2776]65
[3365]66  Texture* diffuseTexture; //!< The diffuse texture of the Material.
67  Texture* ambientTexture; //!< The ambient texture of the Material.
68  Texture* specularTexture;//!< The specular texture of the Material.
[2776]69};
70#endif
Note: See TracBrowser for help on using the repository browser.