diff --git a/vcg/space/index/kdtree/kdtree.h b/vcg/space/index/kdtree/kdtree.h index e3dc70b5..f3af114c 100755 --- a/vcg/space/index/kdtree/kdtree.h +++ b/vcg/space/index/kdtree/kdtree.h @@ -9,8 +9,6 @@ #include #include - - template class ConstDataWrapper { @@ -33,6 +31,15 @@ protected: size_t mSize; }; +template +class VertexConstDataWrapper :public ConstDataWrapper +{ +public: + inline VertexConstDataWrapper(MeshType &m): + ConstDataWrapper ( &(m.vert[0].P()), m.vert.size(), sizeof(typename MeshType::VertexType)) + {} +}; + /** * This class allows to create a Kd-Tree thought to perform the k-nearest neighbour query */