Changeset 7510 in orxonox.OLD for branches/bsp_model/src/lib/graphics/importer/material.h
- Timestamp:
- May 3, 2006, 2:37:13 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/material.h
r7465 r7510 14 14 #endif /* HAVE_CONFIG_H */ 15 15 16 #ifndef NULL 17 #define NULL 0 //!< a pointer to NULL 18 #endif 16 #include <vector> 17 19 18 20 19 #include "texture.h" … … 25 24 class Material : public BaseObject 26 25 { 27 public:28 Material (const std::string& mtlName = "");29 virtual ~Material ();26 public: 27 Material (const std::string& mtlName = ""); 28 virtual ~Material (); 30 29 31 Material& operator=(const Material& material);30 Material& operator=(const Material& material); 32 31 33 bool select () const; 34 bool select0 () const; 35 36 void setIllum (int illum); 37 void setIllum (char* illum); 38 int getIllumModel() const { return this->illumModel; }; 39 void setDiffuse (float r, float g, float b); 40 void setDiffuse (char* rgb); 41 void setAmbient (float r, float g, float b); 42 void setAmbient (char* rgb); 43 void setSpecular (float r, float g, float b); 44 void setSpecular (char* rgb); 45 void setShininess (float shini); 46 void setShininess (char* shini); 47 void setTransparency (float trans); 48 void setTransparency (char* trans); 49 void setBlendFunc(GLenum sFactor, GLenum tFactor) { this->sFactor = sFactor; this->tFactor = tFactor; }; 32 bool select () const; 50 33 51 // MAPPING // 52 void setDiffuseMap(const std::string& dMap, GLenum target = GL_TEXTURE_2D); 53 void setAmbientMap(const std::string& aMap, GLenum target = GL_TEXTURE_2D); 54 void setSpecularMap(const std::string& sMap, GLenum target = GL_TEXTURE_2D); 55 void setBump(const std::string& bump); 56 GLuint getDiffuseTexture() const { return (this->diffuseTexture)? this->diffuseTexture->getTexture() : 0; }; 34 void setIllum (int illum); 35 int getIllumModel() const { return this->illumModel; }; 36 void setDiffuse (float r, float g, float b); 37 void setAmbient (float r, float g, float b); 38 void setSpecular (float r, float g, float b); 39 void setShininess (float shini); 40 void setTransparency (float trans); 41 void setBlendFunc(GLenum sFactor, GLenum tFactor) { this->sFactor = sFactor; this->tFactor = tFactor; }; 57 42 58 static void addTexturePath(const std::string& pathName); 43 44 // TODO Move them out of here 45 void setIllum (char* illum); 46 void setDiffuse (char* rgb); 47 void setAmbient (char* rgb); 48 void setSpecular (char* rgb); 49 void setShininess (char* shini); 50 void setTransparency (char* trans); 51 52 53 // MAPPING // 54 void setDiffuseMap(const std::string& dMap, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0); 55 56 void setAmbientMap(const std::string& aMap, GLenum target = GL_TEXTURE_2D); 57 void setSpecularMap(const std::string& sMap, GLenum target = GL_TEXTURE_2D); 58 void setBump(const std::string& bump); 59 GLuint getDiffuseTexture(unsigned int i = 0) const { return (this->textures.size() > i)? this->textures[i]->getTexture() : 0; }; 60 61 static void addTexturePath(const std::string& pathName); 62 63 public: 64 static const GLenum glTextureArbs[]; //!< The Texture ARB's 65 66 static int getMaxTextureUnits(); 59 67 60 68 private: … … 68 76 GLenum tFactor; 69 77 70 Texture* diffuseTexture; //!< The diffuse texture of the Material. 78 std::vector<Texture*> textures; //!< An Array of Textures. 79 71 80 Texture* ambientTexture; //!< The ambient texture of the Material. 72 81 Texture* specularTexture; //!< The specular texture of the Material. 82 83 73 84 }; 74 85 #endif
Note: See TracChangeset
for help on using the changeset viewer.