Added a VectorConstDataWrapper to simply create a kdtree from a vector of point3f

This commit is contained in:
Paolo Cignoni 2014-04-17 09:50:21 +00:00
parent dbe0d2b7f5
commit 03206b6bc4
1 changed files with 65 additions and 56 deletions

View File

@ -31,6 +31,15 @@ protected:
size_t mSize;
};
template<class StdVectorType>
class VectorConstDataWrapper :public ConstDataWrapper<typename StdVectorType::value_type>
{
public:
inline VectorConstDataWrapper(StdVectorType &vec):
ConstDataWrapper<typename StdVectorType::value_type> ( &(vec[0]), vec.size(), sizeof(typename StdVectorType::value_type))
{}
};
template<class MeshType>
class VertexConstDataWrapper :public ConstDataWrapper<typename MeshType::CoordType>
{