Subversion Repositories gelsvn

Rev

Rev 78 | Rev 90 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
78 jab 1
#ifndef __MATERIAL_H__
2
#define __MATERIAL_H__
3
 
4
#include <string>
5
#include <vector>
6
#include "CGLA/Vec3f.h"
7
#include "CGLA/Vec3i.h"
8
#include "Texmap.h"
9
 
79 jab 10
namespace Geometry
78 jab 11
{
12
	struct Material
13
	{
14
		std::string name;			       	/* name of material */
15
		float diffuse[4];			/* diffuse component */
16
		float ambient[4];			/* ambient component */
17
		float specular[4];		/* specular component */
18
		float shininess;			/* specular exponent */
19
		int tex_id;
20
 
21
		Material():	name("default"), tex_id(-1) 
22
		{
23
			shininess = 0;
24
			diffuse[0] = 0.8;
25
			diffuse[1] = 0.8;
26
			diffuse[2] = 0.8;
27
			diffuse[3] = 1.0;
28
			ambient[0] = 0.2;
29
			ambient[1] = 0.2;
30
			ambient[2] = 0.2;
31
			ambient[3] = 1.0;
32
			specular[0] = 0.0;
33
			specular[1] = 0.0;
34
			specular[2] = 0.0;
35
			specular[3] = 1.0;
36
		}
37
	};
38
}
39
 
40
#endif