projects
/
laserbrain_demo
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
ui notifications
[laserbrain_demo]
/
src
/
material.h
1
#ifndef MATERIAL_H_
2
#define MATERIAL_H_
3
4
#include <vector>
5
#include <string>
6
#include <gmath/gmath.h>
7
#include "texture.h"
8
9
enum {
10
MTL_TEX_DIFFUSE,
11
MTL_TEX_SPECULAR,
12
MTL_TEX_NORMALMAP,
13
MTL_TEX_LIGHTMAP,
14
MTL_TEX_ENVMAP,
15
16
MTL_TEX_UNKNOWN
17
};
18
19
#define NUM_MTL_TEXTURES MTL_TEX_UNKNOWN
20
21
class Material {
22
public:
23
std::string name;
24
Vec3 diffuse, specular;
25
float shininess;
26
float alpha;
27
28
Texture *stdtex[NUM_MTL_TEXTURES];
29
std::vector<Texture*> textures;
30
31
Material();
32
void setup() const;
33
34
void add_texture(Texture *tex, int type = MTL_TEX_UNKNOWN);
35
};
36
37
#endif // MATERIAL_H_