Subversion Repositories gelsvn

Rev

Rev 362 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 362 Rev 393
1
#ifndef __TESSELATE_H
1
#ifndef __TESSELATE_H
2
#define __TESSELATE_H
2
#define __TESSELATE_H
3
 
3
 
4
#include "CGLA/Vec3f.h"
4
#include "CGLA/Vec3f.h"
5
#include "Util/Grid2D.h"
5
#include "Util/Grid2D.h"
6
#include "IndexedFaceSet.h"
6
#include "IndexedFaceSet.h"
7
 
7
 
8
namespace Geometry
8
namespace Geometry
9
{
9
{
10
	
10
	
11
	class ParSurf
11
	class ParSurf
12
{
12
{
13
public:
13
public:
14
	virtual CGLA::Vec3f operator()(float u, float v) const = 0;
14
	virtual CGLA::Vec3f operator()(float u, float v) const = 0;
15
};
15
};
16
 
16
 
17
extern float MAX_ERR;
17
extern float MAX_ERR;
18
extern float MAX_DIST;
18
extern float MAX_DIST;
19
extern int ADAPTIVE;
19
extern int ADAPTIVE;
20
 
20
 
21
 
21
 
22
void tessellate(IndexedFaceSet& face_set, ParSurf& s,
22
void tessellate(IndexedFaceSet& face_set, ParSurf& s,
23
			   float u_min, float u_max, float v_min, float v_max, 
23
			   float u_min, float u_max, float v_min, float v_max, 
24
			   int n, int m);
24
			   int n, int m);
25
 
25
 
26
void tessellate(IndexedFaceSet& face_set, ParSurf& s, 
26
void tessellate(IndexedFaceSet& face_set, ParSurf& s, 
27
			   Util::Grid2D<CGLA::Vec3f>& inigrid);
27
			   Util::Grid2D<CGLA::Vec3f>& inigrid);
28
 
28
 
29
void tessellate(IndexedFaceSet& face_set, ParSurf& s, 
29
void tessellate(IndexedFaceSet& face_set, ParSurf& s, 
30
			   std::vector<CGLA::Vec2f> uv_points,
30
			   std::vector<CGLA::Vec2f> uv_points,
31
			   std::vector<CGLA::Vec3i> triangles);
31
			   std::vector<CGLA::Vec3i> triangles);
32
}
32
}
33
 
33
 
34
#endif
34
#endif
35
 
35