|
|
| TopoOffsetTriMesh (Parameters &_m_params, int _num_threads=0) |
| |
| void | init_from_image (const MatrixXd &V, const MatrixXi &F, const MatrixSi &F_tags, const MatrixXd &V_env, const MatrixXi &F_env, const std::vector< std::string > &tag_names) |
| | initialize TriMesh from vertex, face, tag data
|
| |
|
void | label_input_complex () |
| | label input complex simplices as per boolean expression (or single body mode)
|
| |
|
bool | empty_input_complex () |
| | check if the input complex is empty. Only valid after calling init_from_image(...). Checks if any vertices (therefore any simplices) are labelled 1, if not returns true
|
| |
|
void | init_input_complex_bvh () |
| | initialize BVH for input complex. Must be called after init_from_image(...)
|
| |
|
void | edge_split_binary_search (const size_t v1, const size_t v2, Vector2d &p_new) const |
| | split edge at point by minimizing m_params.target_distance - d() (where d() is distance to input complex via BVH) along the edge. Uses binary search, so implicitly assumes distance field is monotonic along edge. May give weird results if not monotonic
|
| |
| bool | split_edge_before (const Tuple &t) override |
| | User specified preparations and desideratas for an edge split.
|
| |
| bool | split_edge_after (const Tuple &t) override |
| | User specified modifications and desideratas after an edge split.
|
| |
| bool | split_face_before (const Tuple &t) override |
| | User specified preparations and desideratas for a face split.
|
| |
| bool | split_face_after (const Tuple &t) override |
| | User specified modifications and desideratas after a face split.
|
| |
| bool | invariants (const std::vector< Tuple > &tris) override |
| | User specified invariants that can't be violated.
|
| |
|
void | marching_tris () |
| | execute simplistic marching tets. All edges with one vertex labelled 0 and the other 1/2 are split. If m_edge_split_mode=BinarySearch, edges are split according to BVH distance field and the offset target distance (m_params.target_distance). If m_edge_split_mode=Midpoint, edges are split at the midpoint
|
| |
|
bool | is_simplicially_embedded () const |
| | check if the input complex (simplices labelled 1) are simplicially embedded w.r.t. the entire mesh
|
| |
|
bool | tri_is_simp_emb (const Tuple &t) const |
| | check if a triangle satisfies simpicial embedding criteria w.r.t. input complex (simplices labelled 1)
|
| |
|
void | simplicial_embedding () |
| | make mesh a simplicial embedding of the input complex (simplices labelled 1)
|
| |
|
bool | tag_tri_consistent_topology (size_t f_id, int64_t tag) const |
| | check if removing the given face from the given tag set would retain its topology
|
| |
|
bool | offset_tri_consistent_topology (const size_t f_id) const |
| | check if adding a triangle to the offset region does not change the topology of the offset. Returns true if topology would not be changed
|
| |
|
bool | tri_is_in_offset_conservative (const size_t f_id, const double threshold_r) const |
| | check if a triangle is inside the offset (implicitly defined via BVH distance field to input complex) via conservative circle subdivision estimation
|
| |
|
void | grow_offset_conservative () |
| | grow offset region conservatively using conservative checks while ensuring consistent topology
|
| |
|
void | set_offset_tri_tags () |
| | update 'tags' data for triangles in the offset region (tris labelled 2) based on the given offset tag values in m_params.offset_tag_value
|
| |
|
bool | offset_is_manifold () |
| | verify that the closed offset region (simplices labelled 1 or 2) form a manifold region. This should be true for any offset. This function is for verification
|
| |
|
void | write_input_complex (const std::string &path) |
| |
|
void | write_vtu (const std::string &path) |
| |
|
void | write_msh_groups (const std::string &file) |
| |
|
size_t | edge_id_from_simplex (const simplex::Edge &e) const |
| | get global id of edge from simplex::Edge object
|
| |
|
Tuple | get_tuple_from_edge (const simplex::Edge &e) const |
| | get Tuple simplex::Edge object
|
| |
|
std::vector< Tuple > | get_edge_adjacent_faces (const Tuple &f) const |
| | get faces (as Tuples) that are edge-adjacent to the given face (as Tuple)
|
| |
| void | init (size_t n_vertices, const std::vector< std::array< size_t, 3 > > &tris) |
| |
| void | init (const MatrixXi &F) |
| | Generate the connectivity of the mesh from an IGL-style F matrix.
|
| |
| std::vector< Tuple > | get_vertices () const |
| |
| std::vector< Tuple > | get_edges () const |
| |
| std::vector< Tuple > | get_faces () const |
| |
| Tuple | tuple_from_edge (size_t vid1, size_t vid2, size_t fid) const |
| |
|
Tuple | tuple_from_vids (size_t vid0, size_t vid1, size_t vid2) const |
| |
|
simplex::Vertex | simplex_from_vertex (const Tuple &t) const |
| |
|
simplex::Edge | simplex_from_edge (const Tuple &t) const |
| |
|
simplex::Face | simplex_from_face (const Tuple &t) const |
| |
|
simplex::Face | simplex_from_face (const size_t fid) const |
| |
|
Tuple | tuple_from_simplex (const simplex::Face &s) const |
| |
|
simplex::SimplexCollection | simplex_incident_triangles (const simplex::Vertex &v) const |
| |
|
simplex::SimplexCollection | simplex_incident_triangles (const simplex::Edge &e) const |
| |
|
simplex::SimplexCollection | simplex_link_vertices (const simplex::Vertex &v) const |
| |
|
simplex::SimplexCollection | simplex_link_vertices (const simplex::Edge &e) const |
| |
|
simplex::SimplexCollection | simplex_link_edges (const simplex::Vertex &v) const |
| |
| virtual bool | collapse_edge_before (const Tuple &t) |
| | User specified preparations and desideratas for an edge collapse including the link check as collapse prerequisite.
|
| |
| virtual bool | collapse_edge_after (const Tuple &t) |
| | User specified modifications and desideratas after an edge collapse.
|
| |
| virtual bool | swap_edge_after (const Tuple &t) |
| | User specified modifications and desideras after an edge swap.
|
| |
| virtual bool | swap_edge_before (const Tuple &t) |
| | User specified preparations and desideratas for an edge swap including 1.can't swap on boundary edge. 2. when swap edge between v1, v2, there can't exist edges between the two opposite vertices v3, v4.
|
| |
| virtual bool | smooth_before (const Tuple &t) |
| | User specified preparations and desideratas for an edge smooth.
|
| |
| virtual bool | smooth_after (const Tuple &t) |
| | User specified modifications and desideras after an edge smooth.
|
| |
| size_t | tri_capacity () const |
| | get the current largest global fid
|
| |
| size_t | vert_capacity () const |
| | get the current largest global vid
|
| |
| void | consolidate_mesh () |
| | removing the elements that are removed
|
| |
|
Tuple | switch_vertex (const Tuple &t) const |
| | a duplicate of Tuple::switch_vertex funciton
|
| |
|
Tuple | switch_edge (const Tuple &t) const |
| | a duplicate of Tuple::switch_edge funciton
|
| |
| std::optional< Tuple > | switch_face (const Tuple &t) const |
| | a duplicate of Tuple::switch_face funciton
|
| |
| bool | check_link_condition (const Tuple &t) const |
| | prerequisite for collapse
|
| |
| bool | check_mesh_connectivity_validity () const |
| | verify the connectivity validity of the mesh
|
| |
|
bool | check_edge_manifold () const |
| | verify the edge manifoldness of the mesh
|
| |
| bool | is_boundary_edge (const TriMesh::Tuple &t) const |
| | check if edge that's represented by a Tuple is at the boundary of the mesh
|
| |
| bool | is_boundary_vertex (const TriMesh::Tuple &t) const |
| | check if the vertex that's represented by a Tuple is at the boundary of the mesh
|
| |
| bool | split_edge (const Tuple &t, std::vector< Tuple > &new_t) |
| |
| virtual bool | collapse_edge (const Tuple &t, std::vector< Tuple > &new_t) |
| |
| void | collapse_edge_conn (const Tuple &loc0, std::vector< Tuple > &new_tris, Tuple &return_t, size_t &new_vid, std::vector< std::pair< size_t, TriangleConnectivity > > &old_tris, std::vector< std::pair< size_t, VertexConnectivity > > &old_vertices, std::vector< std::pair< size_t, size_t > > &same_edge_vid_fid, std::vector< size_t > &n12_intersect_fids) |
| |
| void | collapse_edge_rollback (size_t &new_vid, std::vector< std::pair< size_t, TriangleConnectivity > > &old_tris, std::vector< std::pair< size_t, VertexConnectivity > > &old_vertices, std::vector< std::pair< size_t, size_t > > &same_edge_vid_fid, std::vector< size_t > &n12_intersect_fids) |
| |
| bool | swap_edge (const Tuple &t, std::vector< Tuple > &new_t) |
| |
| bool | smooth_vertex (const Tuple &t) |
| |
| bool | split_face (const Tuple &t, std::vector< Tuple > &new_t) |
| | Split a face in 3 faces.
|
| |
| size_t | get_valence_for_vertex (const Tuple &t) const |
| | Count the number of the one ring tris for a vertex.
|
| |
| std::vector< Tuple > | get_one_ring_tris_for_vertex (const Tuple &t) const |
| | Get the one ring tris for a vertex.
|
| |
|
const std::vector< size_t > & | get_one_ring_fids_for_vertex (const Tuple &t) const |
| |
|
const std::vector< size_t > & | get_one_ring_fids_for_vertex (const size_t vid) const |
| |
| std::vector< size_t > | get_one_ring_vids_for_vertex_duplicate (const size_t &t) const |
| | Get the vids of the incident one ring tris for a vertex.
|
| |
|
void | get_one_ring_vids_for_vertex_duplicate (const size_t &t, std::vector< size_t > &one_ring) const |
| |
|
std::vector< size_t > | get_incident_fids_for_edge (const Tuple &t) const |
| |
|
std::vector< size_t > | get_incident_fids_for_edge (const size_t vid0, const size_t vid1) const |
| |
| std::vector< Tuple > | get_one_ring_edges_for_vertex (const Tuple &t) const |
| | Get all edges that are incident to the vertex of Tuple t.
|
| |
|
std::vector< Tuple > | get_one_ring_edges_for_vertex (const size_t vid) const |
| |
| std::array< Tuple, 3 > | oriented_tri_vertices (const Tuple &t) const |
| | Get the incident vertices for a triangle.
|
| |
| std::array< size_t, 3 > | oriented_tri_vids (const Tuple &t) const |
| | Get the incident vertices for a triangle.
|
| |
|
std::array< size_t, 3 > | oriented_tri_vids (const size_t i) const |
| |
|
std::array< Tuple, 2 > | get_edge_vertices (const Tuple &t) const |
| |
|
std::array< size_t, 2 > | get_edge_vids (const Tuple &t) const |
| |
| Tuple | tuple_from_tri (size_t fid) const |
| |
| Tuple | tuple_from_vertex (size_t vid) const |
| |
| Tuple | tuple_from_edge (size_t fid, size_t local_eid) const |
| |
|
std::tuple< Tuple, size_t > | tuple_from_edge (const std::array< size_t, 2 > &vids) const |
| |
|
void | start_protect_attributes () |
| | Start the phase where the attributes that will be modified can be recorded.
|
| |
|
void | release_protect_attributes () |
| | End the modification phase.
|
| |
|
void | rollback_protected_attributes () |
| | rollback the attributes that are modified if any condition failed
|
| |
|
int | release_vertex_mutex_in_stack () |
| |
| bool | try_set_vertex_mutex_two_ring (const Tuple &v, int threadid) |
| | try lock the two-ring neighboring triangles' incident vertices
|
| |
| bool | try_set_edge_mutex_two_ring (const Tuple &e, int threadid) |
| | try lock the two-ring neighboring triangles' incident vertices for the two ends of an edge
|
| |
| bool | try_set_vertex_mutex_one_ring (const Tuple &v, int threadid) |
| | get the lock for one ring neighboring triangles' incident vertices
|
| |
| bool | try_set_face_mutex_one_ring (const Tuple &f, int threadid) |
| | try lock the one-ring neighboring triangles' incident vertices.
|
| |
|
void | for_each_face (const std::function< void(const Tuple &)> &) |
| | perform the given function for each face
|
| |
|
void | for_each_edge (const std::function< void(const Tuple &)> &) |
| | perform the given function for each edge
|
| |
|
void | for_each_vertex (const std::function< void(const Tuple &)> &) |
| | perform the given function for each vertex
|
| |
| virtual bool | vertex_is_on_surface (const size_t vid) const |
| | Is a vertex part of the substructure.
|
| |
| virtual bool | edge_is_on_surface (const std::array< size_t, 2 > &vids) const |
| | Is an edge part of the substructure.
|
| |
| simplex::SimplexCollection | get_surface_edges_for_vertex (const size_t vid) const |
| | Get all edges on the surface that are incident to vid.
|
| |
| size_t | get_order_of_edge (const std::array< size_t, 2 > &vids) const |
| | Compute the order of an edge.
|
| |
| size_t | get_order_of_vertex (const size_t vid) const |
| | Get the order of a vertex.
|
| |
| bool | substructure_link_condition (const Tuple &e_tuple) const |
| | Link condition that also considers substructures.
|
| |