decimation.cpp 1.75 KB
Newer Older
Sylvain Thery's avatar
Sylvain Thery committed
1 2 3 4 5 6 7
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
#include "Topology/gmap/embeddedGMap2.h"


#include "Algo/Decimation/decimation.h"

Sylvain Thery's avatar
Sylvain Thery committed
8

Sylvain Thery's avatar
Sylvain Thery committed
9 10 11
using namespace CGoGN;

struct PFP1 : public PFP_STANDARD
Sylvain Thery's avatar
Sylvain Thery committed
12
{
Sylvain Thery's avatar
Sylvain Thery committed
13 14
	typedef EmbeddedMap2 MAP;
};
Sylvain Thery's avatar
Sylvain Thery committed
15

Sylvain Thery's avatar
Sylvain Thery committed
16
struct PFP2 : public PFP_DOUBLE
Sylvain Thery's avatar
Sylvain Thery committed
17
{
Sylvain Thery's avatar
Sylvain Thery committed
18 19
	typedef EmbeddedMap2 MAP;
};
Sylvain Thery's avatar
Sylvain Thery committed
20

Sylvain Thery's avatar
Sylvain Thery committed
21
struct PFP3 : public PFP_DOUBLE
Sylvain Thery's avatar
Sylvain Thery committed
22
{
Sylvain Thery's avatar
Sylvain Thery committed
23 24 25 26
	typedef EmbeddedGMap2 MAP;
};


Sylvain Thery's avatar
Sylvain Thery committed
27

Sylvain Thery's avatar
Sylvain Thery committed
28 29
template int Algo::Surface::Decimation::decimate<PFP1, Geom::Vec3f>(
	PFP1::MAP& map,
Sylvain Thery's avatar
Sylvain Thery committed
30 31
	SelectorType s,
	ApproximatorType a,
Sylvain Thery's avatar
Sylvain Thery committed
32
	std::vector<VertexAttribute<Geom::Vec3f, PFP1::MAP> >& attribs,
Sylvain Thery's avatar
Sylvain Thery committed
33
	unsigned int nbWantedVertices,
Sylvain Thery's avatar
Sylvain Thery committed
34 35 36 37 38 39 40 41 42 43
	EdgeAttribute<PFP1::REAL, PFP1::MAP>* edgeErrors,
	void(*callback_wrapper)(void*, const void*) ,
	void* callback_object
	);


template int Algo::Surface::Decimation::decimate<PFP1>(
	PFP1::MAP& map,
	Selector<PFP1>* s,
	std::vector<ApproximatorGen<PFP1>*>& a,
Sylvain Thery's avatar
Sylvain Thery committed
44
	unsigned int nbWantedVertices,
Sylvain Thery's avatar
Sylvain Thery committed
45 46 47 48 49
	bool recomputePriorityList,
	EdgeAttribute<PFP1::REAL, PFP1::MAP>* edgeErrors,
	void(*callback_wrapper)(void*, const void*),
	void* callback_object 
	);
Sylvain Thery's avatar
Sylvain Thery committed
50 51


Sylvain Thery's avatar
Sylvain Thery committed
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
template int Algo::Surface::Decimation::decimate<PFP2, Geom::Vec3d>(
	PFP2::MAP& map,
	SelectorType s,
	ApproximatorType a,
	std::vector<VertexAttribute<Geom::Vec3d, PFP2::MAP> >& attribs,
	unsigned int nbWantedVertices,
	EdgeAttribute<PFP2::REAL, PFP2::MAP>* edgeErrors,
	void(*callback_wrapper)(void*, const void*),
	void* callback_object
	);
//
//
//template int Algo::Surface::Decimation::decimate<PFP2>(
//	PFP2::MAP& map,
//	Selector<PFP2>* s,
//	std::vector<ApproximatorGen<PFP2>*>& a,
//	unsigned int nbWantedVertices,
//	bool recomputePriorityList,
//	EdgeAttribute<PFP2::REAL, PFP2::MAP>* edgeErrors,
//	void(*callback_wrapper)(void*, const void*),
//	void* callback_object
//	);
Sylvain Thery's avatar
Sylvain Thery committed
74 75 76



Sylvain Thery's avatar
Sylvain Thery committed
77 78
int test_decimation()
{
Sylvain Thery's avatar
Sylvain Thery committed
79

Sylvain Thery's avatar
Sylvain Thery committed
80 81
	return 0;
}