Wildmeshing Toolkit
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
wmtk::UnionEnvelope Class Referencefinal

#include <CompositeEnvelopes.hpp>

Inheritance diagram for wmtk::UnionEnvelope:
wmtk::Envelope

Public Member Functions

 UnionEnvelope (std::vector< std::shared_ptr< Envelope > > members)
 
bool is_outside (const std::array< Eigen::Vector3d, 3 > &tris) const override
 
bool is_outside (const Eigen::Vector3d &pts) const override
 
bool is_outside (const std::array< Eigen::Vector2d, 2 > &edge) const override
 
bool is_outside (const Eigen::Vector2d &pts) const override
 
- Public Member Functions inherited from wmtk::Envelope
 Envelope (bool exact=true)
 
void set_max_threads (int n)
 How many threads one triangle query may use. 1, the default: every sample is checked on the calling thread.
 
virtual void init (const std::vector< Eigen::Vector3d > &m_ver, const std::vector< Eigen::Vector3i > &m_faces, const double)
 
void init (const std::vector< Eigen::Vector3d > &m_ver, const std::vector< Eigen::Vector2i > &m_edges, const double)
 
void init (const std::vector< Eigen::Vector2d > &m_ver, const std::vector< Eigen::Vector2i > &m_edges, const double)
 
void init (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const double eps)
 Same, from Eigen matrices, dispatching on the column counts.
 
bool is_outside (const std::array< Eigen::Vector3d, 2 > &edge) const
 
double nearest_point (const Eigen::Vector3d &pts, Eigen::Vector3d &result) const
 
double nearest_point (const Eigen::Vector2d &pts, Eigen::Vector2d &result) const
 
double nearest_point_feature (const Eigen::Vector2d &p, Eigen::Vector2d &result, bool &on_corner, Eigen::Vector2d &seg_normal, int &feature_id) const
 
double nearest_point_feature (const Eigen::Vector3d &p, Eigen::Vector3d &result, int &feature_dim, Eigen::Vector3d &dir, long long &feature_id) const
 
bool initialized ()
 
Kind kind () const
 
double squared_distance (const Eigen::Vector3d &p) const
 
double squared_distance (const Eigen::Vector2d &p) const
 
void primitives_in_box (const Eigen::Vector3d &lo, const Eigen::Vector3d &hi, std::vector< int64_t > &ids) const
 The ids of every primitive whose bounding box meets the closed box [lo, hi], ascending, each once.
 
void primitives_in_box (const Eigen::Vector2d &lo, const Eigen::Vector2d &hi, std::vector< int64_t > &ids) const
 The 2D counterpart, for Edges2d: the same tree, which holds the 2D input lifted to z = 0.
 
double primitive_distance (int64_t id, const Eigen::Vector3d &p, Eigen::Vector3d *grad=nullptr, Eigen::Matrix3d *hess=nullptr) const
 The distance d from p to primitive id alone, with its gradient and Hessian when asked for (nullptr = not wanted).
 
double primitive_distance (int64_t id, const Eigen::Vector2d &p, Eigen::Vector2d *grad=nullptr, Eigen::Matrix2d *hess=nullptr) const
 
double primitive_triangle_distance (int64_t id, const std::array< Eigen::Vector3d, 3 > &tri) const
 The distance between the triangle tri and primitive id alone.
 
double primitive_segment_distance (int64_t id, const std::array< Eigen::Vector2d, 2 > &seg) const
 The 2D counterpart, for Edges2d: the distance between the segment seg and primitive id alone – a 2D front edge where the 3D query takes a front face.
 

Private Attributes

std::vector< std::shared_ptr< Envelope > > m_members
 

Additional Inherited Members

- Public Types inherited from wmtk::Envelope
enum class  Kind { Uninitialized , Triangles3d , Edges3d , Edges2d }
 
- Public Attributes inherited from wmtk::Envelope
double eps2 = 1e-6
 
double eps2_edge = 1e-6
 
double sampling_dist = 1e-3
 
bool use_exact = true
 
bool disabled = false
 

Detailed Description

Inside means inside any member: the tube union. Assigned to the inherited m_envelope, so the shared engine's "may this surface vertex land on a non-surface position" point check keeps its semantics with no changes there.

Member Function Documentation

◆ is_outside() [1/4]

bool wmtk::UnionEnvelope::is_outside ( const Eigen::Vector2d &  pts) const
inlineoverridevirtual

Reimplemented from wmtk::Envelope.

◆ is_outside() [2/4]

bool wmtk::UnionEnvelope::is_outside ( const Eigen::Vector3d &  pts) const
inlineoverridevirtual

Reimplemented from wmtk::Envelope.

◆ is_outside() [3/4]

bool wmtk::UnionEnvelope::is_outside ( const std::array< Eigen::Vector2d, 2 > &  edge) const
inlineoverridevirtual

Reimplemented from wmtk::Envelope.

◆ is_outside() [4/4]

bool wmtk::UnionEnvelope::is_outside ( const std::array< Eigen::Vector3d, 3 > &  tris) const
inlineoverridevirtual

Four containment queries are VIRTUAL – the 3D triangle, the 3D point, the 2D segment and the 2D point – so a containment-only composite over several envelopes can answer them. They are exactly what the 3D and the 2D containment paths ask. The 3D segment query is not virtual. See the composites in wmtk/envelope/CompositeEnvelopes.hpp, and the invariant stated there: a composite must never reach the NON-virtual queries, whose BVH it does not have.

Reimplemented from wmtk::Envelope.


The documentation for this class was generated from the following file: