Subversion Repositories gelsvn

Rev

Rev 145 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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