From 2a1aebfa3d02fa5107a13826bd5107e34e2c12a0 Mon Sep 17 00:00:00 2001 From: cignoni Date: Wed, 17 Mar 2010 09:22:23 +0000 Subject: [PATCH] converted to the new UsedTypes syntax --- vcg/complex/trimesh/autoalign_4pcs.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/vcg/complex/trimesh/autoalign_4pcs.h b/vcg/complex/trimesh/autoalign_4pcs.h index e1dbee1c..ae2873ac 100644 --- a/vcg/complex/trimesh/autoalign_4pcs.h +++ b/vcg/complex/trimesh/autoalign_4pcs.h @@ -58,11 +58,18 @@ template class FourPCS { public: /* mesh only for using spatial indexing functions (to remove) */ - class PEdge; // dummy prototype never used - class PFace; - class PVertex : public vcg::VertexSimp2< PVertex, PEdge, PFace,vcg::vertex::BitFlags,vcg::vertex::Coord3f ,vcg::vertex::Mark>{}; + class PVertex; // dummy prototype never used + class PEdge; // dummy prototype never used + class PFace; + + class PUsedTypes: public vcg::UsedTypes < vcg::Use::template AsVertexType, + vcg::Use::template AsEdgeType, + vcg::Use::template AsFaceType >{}; + + + class PVertex : public vcg::Vertex< PUsedTypes,vcg::vertex::BitFlags,vcg::vertex::Coord3f ,vcg::vertex::Mark>{}; /*same as for the vertes */ - class PFace : public vcg::FaceSimp2< PVertex, PEdge, PFace> {}; + class PFace : public vcg::Face< PUsedTypes> {}; /*the mesh is a container of vertices and a container of faces */ class PMesh : public vcg::tri::TriMesh< std::vector, std::vector > {}; @@ -127,7 +134,7 @@ private: ScalarType err; int score; int base; // debug: for which base - const bool & operator <(const CandiType & o) const {return score > o.score;} + inline bool operator <(const CandiType & o) const {return score > o.score;} };