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

#include <TagEnvelopes.hpp>

Inheritance diagram for wmtk::components::topological_offset::IntersectionEnvelope:
wmtk::SampleEnvelope wmtk::Envelope

Public Member Functions

 IntersectionEnvelope (std::vector< std::shared_ptr< SampleEnvelope > > 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
 
const std::vector< std::shared_ptr< SampleEnvelope > > & members () const
 
- Public Member Functions inherited from wmtk::SampleEnvelope
 SampleEnvelope (bool exact=false)
 
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, 3 > &tris) const
 
bool is_outside (const std::array< Eigen::Vector3d, 2 > &edge) const
 
bool is_outside (const Eigen::Vector3d &pts) 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
 

Private Attributes

std::vector< std::shared_ptr< SampleEnvelope > > m_members
 

Additional Inherited Members

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

Detailed Description

Containment-only composites over per-tag boundary envelopes, in both dimensions.

Both classes override exactly the four virtual queries – is_outside(triangle3) and is_outside(point3) on wmtk::Envelope, is_outside(segment2) and is_outside(point2) on SampleEnvelope – which are the only calls the containment paths make.

A composite must never reach a caller of the non-virtual SampleEnvelope queries: nearest_point, nearest_point_feature, squared_distance, or the edge/2D is_outside overloads. Those bind statically to the base subobject, whose BVH was never built, and dereference null. Such callers are fed by smoothing_energy_envelope(), and that hook returns a single real member envelope by contract – the most-violated one for a junction vertex – never a composite. Inside means inside every member: the tube intersection. This is what pins a junction simplex to the junction, within eps of each boundary it lies on, and what holds a wire or isolated point of the input complex in place, since those only arise where two or more selected tags meet.

Member Function Documentation

◆ is_outside() [1/4]

bool wmtk::components::topological_offset::IntersectionEnvelope::is_outside ( const Eigen::Vector2d &  pts) const
inlineoverridevirtual

Reimplemented from wmtk::SampleEnvelope.

◆ is_outside() [2/4]

bool wmtk::components::topological_offset::IntersectionEnvelope::is_outside ( const Eigen::Vector3d &  pts) const
inlineoverridevirtual

Reimplemented from wmtk::Envelope.

◆ is_outside() [3/4]

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

The 2D pair is VIRTUAL where the 3D edge query is not, so a containment-only composite over several envelopes can answer them. wmtk::Envelope declares virtual is_outside only for the 3D triangle and the 3D point – which is all a 3D composite needs – and 2D's containment path asks these two instead. See the composites in components/topological_offset/.../TagEnvelopes.hpp, and the invariant stated there: a composite must never reach the NON-virtual queries below, whose BVH it does not have.

Reimplemented from wmtk::SampleEnvelope.

◆ is_outside() [4/4]

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

Reimplemented from wmtk::Envelope.


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