1#ifndef CONSTELLATION_TILDEFS_H
2#define CONSTELLATION_TILDEFS_H
4#include <kdtree++/kdtree.hpp>
16 template <
typename Po
intType>
20 typedef std::pair<uint, PointType>
_Val;
35 std::vector<std::pair< uint, Point3df > > vert;
36 vert.reserve( mesh.vertex().size() );
37 std::vector<Point3df>::const_iterator iv, ev = mesh.vertex().end();
39 for( iv=mesh.vertex().begin(); iv!=ev; ++iv, ++index )
40 vert.push_back( std::make_pair( index, Point3df( *iv ) ) );
44 typedef KDTree::KDTree<3, std::pair<uint, Point3df>,
45 Bracket_accessor_PointIndex<Point3df> >
49 float dist2(
const Point3df & p1,
const Point3df & p2 )
51 return (p2 - p1).norm2();
KDTree::KDTree< 3, std::pair< uint, Point3df >, Bracket_accessor_PointIndex< Point3df > > KDTree
float dist2(const Point3df &p1, const Point3df &p2)
std::vector< std::pair< uint, Point3df > > KDTreeVertices
KDTreeVertices kdt_vertices(const AimsSurfaceTriangle &mesh)
get vertices vector with index for each vertex
std::pair< uint, PointType > _Val
result_type operator()(_Val const &V, size_t const N) const
AIMSDATA_API AimsTimeSurface< 3, Void > AimsSurfaceTriangle