Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/images/importer/material.h @ 3085

Last change on this file since 3085 was 3085, checked in by bensch, 20 years ago

orxonox/branches/images: bring order to Chaos

File size: 1.7 KB
RevLine 
[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]9extern int verbose; //!< will be obsolete soon.
[2804]10
[2776]11#include <GL/gl.h>
12#include <GL/glu.h>
[3070]13#include <SDL/SDL.h>
[2776]14#include <stdlib.h>
[2823]15#include <fstream>
[2776]16
[3085]17// IMAGE LIBS //
18#include <jpeglib.h>
19
[2842]20//! Class to handle Materials.
[2776]21class Material
22{
23 public:
24  Material ();
25  Material (char* mtlName);
[2778]26  Material* addMaterial(char* mtlName);
[3085]27  ~Material ();
[2776]28  void init(void);
[2778]29
[3085]30  Material* search (char* mtlName);
31  bool select (void);
32
[3070]33  GLuint diffuseTexture;
34  GLuint ambientTexture;
35  GLuint specularTexture;
36 
37  bool diffuseTextureSet;
38  bool ambientTextureSet;
39  bool specularTextureSet;
[2778]40
[2776]41  void setName (char* mtlName);
[2778]42  char* getName (void);
[2776]43  void setIllum (int illum);
44  void setIllum (char* illum);
45  void setDiffuse (float r, float g, float b);
46  void setDiffuse (char* rgb);
47  void setAmbient (float r, float g, float b);
48  void setAmbient (char* rgb);
49  void setSpecular (float r, float g, float b);
50  void setSpecular (char* rgb);
[2836]51  void setShininess (float shini);
52  void setShininess (char* shini);
[2776]53  void setTransparency (float trans);
54  void setTransparency (char* trans);
55
[3085]56
57
58
[3070]59  // MAPPING //
60  void setDiffuseMap(char* dMap);
61  void setAmbientMap(char* aMap);
62  void setSpecularMap(char* sMap);
63  void setBump(char* bump);
64
[3085]65  // TEXTURING
[3070]66  bool loadBMP (char* bmpName, GLuint* texture);
67
[2776]68 private:
[3069]69  char* name;
[2776]70  int illumModel;
[2780]71  float diffuse [4];
72  float ambient [4];
73  float specular [4];
[2836]74  float shininess;
[2776]75  float transparency;
[3085]76  Material* nextMat; //!< pointer to the Next Material of the List. NULL if no next exists.
[2776]77
78};
79#endif
Note: See TracBrowser for help on using the repository browser.