Subversion Repositories gelsvn

Rev

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

Rev 337 Rev 341
Line 10... Line 10...
10
 
10
 
11
#include <stdio.h>
11
#include <stdio.h>
12
#include <math.h>
12
#include <math.h>
13
#include <strings.h>
13
#include <strings.h>
14
#include "ply_load.h"
14
#include "ply_load.h"
-
 
15
#include <CGLA/Vec4f.h>
15
 
16
 
16
using namespace std;
17
using namespace std;
17
using namespace Geometry;
18
using namespace Geometry;
18
using namespace CGLA;
19
using namespace CGLA;
19
 
20
 
Line 165... Line 166...
165
	Vec3f v;
166
	Vec3f v;
166
	FILE* f = fopen(fn.c_str(),"rb");
167
	FILE* f = fopen(fn.c_str(),"rb");
167
	read_file(f);
168
	read_file(f);
168
 
169
 
169
	mesh.materials.resize(1);
170
	mesh.materials.resize(1);
-
 
171
	mesh.materials[0].diffuse[0] = 172.0/256; 
-
 
172
	mesh.materials[0].diffuse[1] = 48.0/256;
-
 
173
	mesh.materials[0].diffuse[2] = 72.0/256;
-
 
174
	mesh.materials[0].specular[0] = 0.6; 
-
 
175
	mesh.materials[0].specular[1] = 0.6;
-
 
176
	mesh.materials[0].specular[2] = 0.6;
-
 
177
	mesh.materials[0].shininess =128;
-
 
178
	
170
 
179
	
171
	int i;
180
	int i;
172
	for (i = 0; i < nverts; i++)
181
	for (i = 0; i < nverts; i++)
173
		mesh.geometry.add_vertex(Vec3f(vlist[i]->x, vlist[i]->y, vlist[i]->z));
182
		mesh.geometry.add_vertex(Vec3f(vlist[i]->x, vlist[i]->y, vlist[i]->z));
174
 
183
 
175
	for (i = 0; i < nfaces; i++) {
184
	for (i = 0; i < nfaces; i++) {