@@ -106,7 +106,7 @@ namespace geode
106106 return *builder_;
107107 }
108108
109- void create_points ( const double epsilon )
109+ void create_points ( double epsilon )
110110 {
111111 auto info = create_colocated_index_mapping ( epsilon );
112112 vertices_ = std::move ( info.colocated_mapping );
@@ -147,28 +147,8 @@ namespace geode
147147 }
148148
149149 private:
150- ColocatedInfo create_colocated_index_mapping ( const double epsilon )
151- {
152- index_t nb_points{ 0 };
153- for ( const auto & mesh : meshes_ )
154- {
155- nb_points += mesh.get ().nb_vertices ();
156- }
157- std::vector< Point< dimension > > points;
158- points.reserve ( nb_points );
159- for ( const auto & mesh : meshes_ )
160- {
161- for ( const auto v : Range{ mesh.get ().nb_vertices () } )
162- {
163- points.emplace_back ( mesh.get ().point ( v ) );
164- }
165- }
166- NNSearch< dimension > nnsearch{ std::move ( points ) };
167- return nnsearch.colocated_index_mapping ( epsilon );
168- }
169-
170- ColocatedInfo create_colocated_index_mapping (
171- const Frame< dimension >& epsilon )
150+ template < typename EpsilonType >
151+ ColocatedInfo create_colocated_index_mapping ( EpsilonType epsilon )
172152 {
173153 index_t nb_points{ 0 };
174154 for ( const auto & mesh : meshes_ )
@@ -218,8 +198,8 @@ namespace geode
218198 }
219199
220200 template < typename Mesh >
221- auto VertexMerger< Mesh >::vertex_origins(
222- index_t vertex ) const -> const VertexOrigins&
201+ auto VertexMerger< Mesh >::vertex_origins( index_t vertex ) const
202+ -> const VertexOrigins&
223203 {
224204 return impl_->vertex_origins ( vertex );
225205 }
0 commit comments