18 const std::shared_ptr<Mesh>& query_mesh_ptr,
19 const std::shared_ptr<Mesh>& surface_ptr)
26 auto winding_numbers =
winding_number(*query_mesh_ptr, surface_mesh);
31 auto winding_number_handle = query_mesh_ptr->register_attribute<
double>(
33 query_mesh_ptr->top_simplex_type(),
35 auto winding_number_accessor = query_mesh_ptr->create_accessor<
double>(winding_number_handle);
37 const auto& top_simplex_tuples = query_mesh_ptr->get_all(query_mesh_ptr->top_simplex_type());
39 for (int64_t i = 0; i < top_simplex_tuples.size(); ++i) {
40 winding_number_accessor.scalar_attribute(top_simplex_tuples[i]) = winding_numbers[i];
43 return query_mesh_ptr;
Eigen::VectorXd winding_number(const Mesh &m, const TriMesh &surface)
std::shared_ptr< Mesh > winding_number(const std::shared_ptr< Mesh > &query_mesh_ptr, const std::shared_ptr< Mesh > &surface_ptr)
spdlog::logger & logger()
Retrieves the current logger.