absence_thelab

view src/3deng/material.h @ 0:1cffe3409164

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 23 Oct 2014 01:46:07 +0300
parents
children
line source
1 #ifndef _MATERIAL_H_
2 #define _MATERIAL_H_
4 #include <string>
5 #include <vector>
6 #include "d3d8.h"
7 #include "3dengtypes.h"
8 #include "color.h"
10 enum TextureType {
11 TextureMap = 0,
12 DetailMap,
13 OpacityMap,
14 LightMap,
15 BumpMap,
16 EnvironmentMap,
17 SpecularMap
18 };
20 const int NumberOfTextureTypes = 7;
22 class Material : public D3DMATERIAL8 {
23 public:
24 std::string name;
25 Texture *Maps[NumberOfTextureTypes];
26 float EnvBlend, BumpIntensity;
27 float Alpha;
28 bool SpecularEnable;
30 Material();
31 Material(float r, float g, float b, float a=1.0f);
33 void SetAmbient(float r, float g, float b);
34 void SetAmbient(const Color &col);
35 void SetDiffuse(float r, float g, float b);
36 void SetDiffuse(const Color &col);
37 void SetSpecular(float r, float g, float b);
38 void SetSpecular(const Color &col);
39 void SetEmissive(float r, float g, float b);
40 void SetEmissive(const Color &col);
41 void SetSpecularPower(float pow);
42 void SetAlpha(float alpha);
43 void SetEnvBlend(float value);
45 void SetTexture(Texture *texture, TextureType type);
46 };
49 #endif // _MATERIAL_H_