Subversion Repositories gelsvn

Rev

Rev 153 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 153 Rev 156
Line 4... Line 4...
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
 
8
 
9
namespace GLGraphics
9
namespace Geometry
10
{
10
{
11
		struct Material
11
		struct Material
12
		{
12
		{
13
				std::string name;			       	/* name of material */
13
				/// Name of material
-
 
14
				std::string name;
-
 
15
				
-
 
16
				/// Diffuse reflection
14
				float diffuse[4];			/* diffuse component */
17
				float diffuse[4];			
-
 
18
				
-
 
19
				/// Ambient reflection
15
				float ambient[4];			/* ambient component */
20
				float ambient[4];
-
 
21
				
-
 
22
				/// Specular reflection
16
				float specular[4];		/* specular component */
23
				float specular[4];		
-
 
24
				
-
 
25
				/// Specular exponent
17
				float shininess;			/* specular exponent */
26
				float shininess;			
18
 
27
 
-
 
28
			bool has_texture;
19
				string tex_path, tex_name;
29
				std::string tex_path, tex_name;
20
				int tex_id;
30
				int tex_id;
21
 
31
 
22
				Material():	name("default"), tex_id(-1) 
32
			Material():	name("default"),
-
 
33
					 tex_path(""), tex_name(""), tex_id(-1) 
23
						{
34
						{
24
								shininess = 0;
35
								shininess = 0;
25
								diffuse[0] = 0.8;
36
								diffuse[0] = 0.8;
26
								diffuse[1] = 0.8;
37
								diffuse[1] = 0.8;
27
								diffuse[2] = 0.8;
38
								diffuse[2] = 0.8;