30 : fastEnvelope::FastEnvelope::FastEnvelope() {};
33 const std::vector<Eigen::Vector3d>& m_ver,
34 const std::vector<Eigen::Vector3i>& m_faces,
37 fastEnvelope::FastEnvelope::init(m_ver, m_faces, eps);
39 bool is_outside(
const std::array<Eigen::Vector3d, 3>& tris)
const
41 return fastEnvelope::FastEnvelope::is_outside(tris);
43 bool is_outside(
const Eigen::Vector3d& pts)
const
45 return fastEnvelope::FastEnvelope::is_outside(pts);
54 : use_exact(exact) {};
56 double sampling_dist = 1e-3;
57 bool use_exact =
false;
59 const std::vector<Eigen::Vector3d>& m_ver,
60 const std::vector<Eigen::Vector3i>& m_faces,
63 const std::vector<Eigen::Vector3d>& m_ver,
64 const std::vector<Eigen::Vector2i>& m_edges,
67 const std::vector<Eigen::Vector2d>& m_ver,
68 const std::vector<Eigen::Vector2i>& m_edges,
70 bool is_outside(
const std::array<Eigen::Vector3d, 3>& tris)
const;
71 bool is_outside(
const std::array<Eigen::Vector3d, 2>& edge)
const;
72 bool is_outside(
const std::array<Eigen::Vector2d, 2>& edge)
const;
73 bool is_outside(
const Eigen::Vector3d& pts)
const;
74 bool is_outside(
const Eigen::Vector2d& pts)
const;
75 double nearest_point(
const Eigen::Vector3d& pts, Eigen::Vector3d& result)
const;
76 double nearest_point(
const Eigen::Vector2d& pts, Eigen::Vector2d& result)
const;
77 bool initialized() {
return m_bvh !=
nullptr; };
79 double squared_distance(
const Eigen::Vector3d& p)
const;
80 double squared_distance(
const Eigen::Vector2d& p)
const;
83 std::vector<int> geo_vertex_ind;
84 std::vector<int> geo_face_ind;
85 std::shared_ptr<SimpleBVH::BVH> m_bvh;
88 fastEnvelope::FastEnvelope exact_envelope;