6#include <igl/signed_distance.h>
97 double max_distance{0.0};
99 Eigen::MatrixXd vertices;
100 Eigen::MatrixXi facets;
105 igl::AABB<Eigen::MatrixXd, 3> tree;
107 Eigen::MatrixXd FN, VN, EN;
110 Eigen::VectorXi EMAP;
Class for computing signed distance fields from triangle meshes.
Definition sdf_calculator.hpp:20
Vec3d SurfacePoint(Vec3d const &pos) const
Find the surface point on the mesh closest to a given point.
Definition sdf_calculator.cpp:250
int ClosestFacet(Vec3d const &pos) const
Find the closest facet on the mesh to a given point.
Definition sdf_calculator.cpp:271
SDFCalculator()
Default constructor.
Definition sdf_calculator.cpp:194
void InitFromSTL(const VecXT< Vec3d > &vv, const VecXT< Vec3i > &ff)
Initialize from a set of vertices and faces.
Definition sdf_calculator.cpp:196
double SignedDistance(Vec3d const &pos) const
Compute the signed distance at a point in space.
Definition sdf_calculator.cpp:229
void Init()
Initialize the SDFCalculator.
Definition sdf_calculator.cpp:208
Class for working with STL models.
Definition stl_model.hpp:17
Definition bond_entry.hpp:7
std::vector< T > VecXT
Definition utils_macros.hpp:31
pos
Definition json_serilization.hpp:19
std::array< double, 3 > Vec3d
Definition utils_macros.hpp:18