MeshLib Rust Docs
Loading...
Searching...
No Matches
Inheritance diagram for meshlib::Mesh:

Public Member Functions

auto assign_from_another (_other:&meshlib::Mesh) -> &mut meshlib::Mesh
auto op_equal (b:&meshlib::Mesh) const -> bool
auto op_not_equal (b:&meshlib::Mesh) const -> bool
auto org_pnt (e:meshlib::EdgeId) const -> meshlib::Vector3f
auto dest_pnt (e:meshlib::EdgeId) const -> meshlib::Vector3f
auto edge_vector (e:meshlib::EdgeId) const -> meshlib::Vector3f
auto edge_segment (e:meshlib::EdgeId) const -> meshlib::Owned< meshlib::LineSegm3f >
auto edge_point_2 (e:meshlib::EdgeId, f:f32) const -> meshlib::Vector3f
auto edge_point_1 (ep:&meshlib::EdgePoint) const -> meshlib::Vector3f
auto edge_center (e:meshlib::UndirectedEdgeId) const -> meshlib::Vector3f
void get_left_tri_points_4 (e:meshlib::EdgeId, v0:&mut meshlib::Vector3f, v1:&mut meshlib::Vector3f, v2:&mut meshlib::Vector3f) const
auto get_left_tri_points_1 (e:meshlib::EdgeId) const -> meshlib::std_array_MR_Vector3f_3
void get_tri_points_4 (f:meshlib::FaceId, v0:&mut meshlib::Vector3f, v1:&mut meshlib::Vector3f, v2:&mut meshlib::Vector3f) const
auto get_tri_points_1 (f:meshlib::FaceId) const -> meshlib::std_array_MR_Vector3f_3
auto tri_point (p:&meshlib::MeshTriPoint) const -> meshlib::Vector3f
auto tri_center (f:meshlib::FaceId) const -> meshlib::Vector3f
auto triangle_aspect_ratio (f:meshlib::FaceId) const -> f32
auto circumcircle_diameter_sq (f:meshlib::FaceId) const -> f32
auto circumcircle_diameter (f:meshlib::FaceId) const -> f32
auto to_tri_point_1_mr_vert_id (v:meshlib::VertId) const -> meshlib::Owned< meshlib::MeshTriPoint >
auto to_tri_point_2 (f:meshlib::FaceId, p:&meshlib::Vector3f) const -> meshlib::Owned< meshlib::MeshTriPoint >
auto to_tri_point_1_mr_point_on_face (p:&meshlib::PointOnFace) const -> meshlib::Owned< meshlib::MeshTriPoint >
auto to_edge_point_1 (v:meshlib::VertId) const -> meshlib::Owned< meshlib::EdgePoint >
auto to_edge_point_2 (e:meshlib::EdgeId, p:&meshlib::Vector3f) const -> meshlib::Owned< meshlib::EdgePoint >
auto get_closest_vertex_mr_point_on_face (p:&meshlib::PointOnFace) const -> meshlib::VertId
auto get_closest_vertex_mr_mesh_tri_point (p:&meshlib::MeshTriPoint) const -> meshlib::VertId
auto get_closest_edge_mr_point_on_face (p:&meshlib::PointOnFace) const -> meshlib::UndirectedEdgeId
auto get_closest_edge_mr_mesh_tri_point (p:&meshlib::MeshTriPoint) const -> meshlib::UndirectedEdgeId
auto edge_length (e:meshlib::UndirectedEdgeId) const -> f32
auto edge_lengths () const -> meshlib::Owned< meshlib::UndirectedEdgeScalars >
auto edge_length_sq (e:meshlib::UndirectedEdgeId) const -> f32
auto left_dir_dbl_area (e:meshlib::EdgeId) const -> meshlib::Vector3f
auto dir_dbl_area_mr_face_id (f:meshlib::FaceId) const -> meshlib::Vector3f
auto dbl_area_mr_face_id (f:meshlib::FaceId) const -> f32
auto area_mr_face_id (f:meshlib::FaceId) const -> f32
auto area_const_mr_face_bit_set_ptr (fs:Option<&meshlib::FaceBitSet >) const -> f64
auto dir_area (fs:Option<&meshlib::FaceBitSet >) const -> meshlib::Vector3d
auto proj_area (dir:&meshlib::Vector3f, fs:Option<&meshlib::FaceBitSet >) const -> f64
auto volume (region:Option<&meshlib::FaceBitSet >) const -> f64
auto hole_perimeter (e:meshlib::EdgeId) const -> f64
auto hole_dir_area (e:meshlib::EdgeId) const -> meshlib::Vector3d
auto left_tangent (e:meshlib::EdgeId) const -> meshlib::Vector3f
auto left_normal (e:meshlib::EdgeId) const -> meshlib::Vector3f
auto normal_mr_face_id (f:meshlib::FaceId) const -> meshlib::Vector3f
auto get_plane3f (f:meshlib::FaceId) const -> meshlib::Owned< meshlib::Plane3f >
auto get_plane3d (f:meshlib::FaceId) const -> meshlib::Owned< meshlib::Plane3d >
auto dir_dbl_area_mr_vert_id (v:meshlib::VertId) const -> meshlib::Vector3f
auto dbl_area_mr_vert_id (v:meshlib::VertId) const -> f32
auto normal_mr_vert_id (v:meshlib::VertId) const -> meshlib::Vector3f
auto normal_mr_mesh_tri_point (p:&meshlib::MeshTriPoint) const -> meshlib::Vector3f
auto pseudonormal_mr_vert_id (v:meshlib::VertId, region:Option<&meshlib::FaceBitSet >) const -> meshlib::Vector3f
auto pseudonormal_mr_undirected_edge_id (e:meshlib::UndirectedEdgeId, region:Option<&meshlib::FaceBitSet >) const -> meshlib::Vector3f
auto pseudonormal_mr_mesh_tri_point (p:&meshlib::MeshTriPoint, region:Option<&meshlib::FaceBitSet >) const -> meshlib::Vector3f
auto signed_distance_3_mr_mesh_projection_result (pt:&meshlib::Vector3f, proj:&meshlib::MeshProjectionResult, region:Option<&meshlib::FaceBitSet >) const -> f32
auto signed_distance_1 (pt:&meshlib::Vector3f) const -> f32
auto signed_distance_3_float (pt:&meshlib::Vector3f, maxDistSq:f32, region:Option<&meshlib::FaceBitSet >) const -> meshlib::Owned< meshlib::std_optional_float >
auto calc_fast_winding_number (pt:&meshlib::Vector3f, beta:Option< f32 >) const -> f32
auto is_outside (pt:&meshlib::Vector3f, windingNumberThreshold:Option< f32 >, beta:Option< f32 >) const -> bool
auto is_outside_by_proj_norm (pt:&meshlib::Vector3f, proj:&meshlib::MeshProjectionResult, region:Option<&meshlib::FaceBitSet >) const -> bool
auto sum_angles (v:meshlib::VertId, outBoundaryVert:Option<&mut bool >) const -> f32
auto find_spike_vertices (minSumAngle:f32, region:Option<&meshlib::VertBitSet >, cb:Option<&meshlib::std_function_bool_from_float >) const -> meshlib::Owned< meshlib::expected_MR_VertBitSet_std_string >
auto dihedral_angle_sin (e:meshlib::UndirectedEdgeId) const -> f32
auto dihedral_angle_cos (e:meshlib::UndirectedEdgeId) const -> f32
auto dihedral_angle (e:meshlib::UndirectedEdgeId) const -> f32
auto discrete_mean_curvature_mr_vert_id (v:meshlib::VertId) const -> f32
auto discrete_mean_curvature_mr_undirected_edge_id (e:meshlib::UndirectedEdgeId) const -> f32
auto discrete_gaussian_curvature (v:meshlib::VertId, outBoundaryVert:Option<&mut bool >) const -> f32
auto discrete_mean_curvatures (region:Option<&meshlib::VertBitSet >) const -> meshlib::Owned< meshlib::VertScalars >
auto discrete_gaussian_curvatures (region:Option<&meshlib::VertBitSet >) const -> meshlib::Owned< meshlib::VertScalars >
auto find_sharp_edges (minSharpCos:f32, maxSharpCos:f32) const -> meshlib::Owned< meshlib::UndirectedEdgeBitSet >
auto find_crease_edges (angleFromPlanar:f32) const -> meshlib::Owned< meshlib::UndirectedEdgeBitSet >
auto left_cotan (e:meshlib::EdgeId) const -> f32
auto cotan (ue:meshlib::UndirectedEdgeId) const -> f32
auto quadratic_form (v:meshlib::VertId, angleWeigted:bool, region:Option<&meshlib::FaceBitSet >, creases:Option<&meshlib::UndirectedEdgeBitSet >) const -> meshlib::Owned< meshlib::QuadraticForm3f >
auto get_bounding_box () const -> meshlib::Box3f
auto compute_bounding_box (toWorld:Option<&meshlib::AffineXf3f >) const -> meshlib::Box3f
auto compute_bounding_box_region (region:Option<&meshlib::FaceBitSet >, toWorld:Option<&meshlib::AffineXf3f >) const -> meshlib::Box3f
auto average_edge_length () const -> f32
auto find_center_from_points () const -> meshlib::Vector3f
auto find_center_from_faces () const -> meshlib::Vector3f
auto find_center_from_b_box () const -> meshlib::Vector3f
void zero_unused_points ()
void transform (xf:&meshlib::AffineXf3f, region:Option<&meshlib::VertBitSet >)
auto add_point (pos:&meshlib::Vector3f) -> meshlib::VertId
auto add_separate_edge_loop (contourPoints:&meshlib::std_vector_MR_Vector3f) -> meshlib::EdgeId
auto add_separate_contours (contours:&meshlib::std_vector_std_vector_MR_Vector3f, xf:Option<&meshlib::AffineXf3f >) -> meshlib::EdgeId
void attach_edge_loop_part (first:meshlib::EdgeId, last:meshlib::EdgeId, contourPoints:&meshlib::std_vector_MR_Vector3f)
auto split_edge_4 (e:meshlib::EdgeId, newVertPos:&meshlib::Vector3f, region:Option<&mut meshlib::FaceBitSet >, new2Old:Option<&mut meshlib::phmap::phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_std_pair_const_MR_FaceId_MR_FaceId >) -> meshlib::EdgeId
auto split_edge_3 (e:meshlib::EdgeId, region:Option<&mut meshlib::FaceBitSet >, new2Old:Option<&mut meshlib::phmap::phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_std_pair_const_MR_FaceId_MR_FaceId >) -> meshlib::EdgeId
auto split_face_4 (f:meshlib::FaceId, newVertPos:&meshlib::Vector3f, region:Option<&mut meshlib::FaceBitSet >, new2Old:Option<&mut meshlib::phmap::phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_std_pair_const_MR_FaceId_MR_FaceId >) -> meshlib::VertId
auto split_face_3 (f:meshlib::FaceId, region:Option<&mut meshlib::FaceBitSet >, new2Old:Option<&mut meshlib::phmap::phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_std_pair_const_MR_FaceId_MR_FaceId >) -> meshlib::VertId
void add_mesh (from:&meshlib::Mesh, map:Option<&meshlib::PartMapping >, rearrangeTriangles:Option< bool >)
void add_mesh_out_maps (from:&meshlib::Mesh, outFmap:Option<&mut meshlib::FaceMap >, outVmap:Option<&mut meshlib::VertMap >, outEmap:Option<&mut meshlib::WholeEdgeMap >, rearrangeTriangles:Option< bool >)
void add_mesh_part_mapping (from:&meshlib::MeshPart, map:&meshlib::PartMapping, vacant:Option<&mut meshlib::VacantElements >)
auto add_mesh_part (from:&meshlib::MeshPart, flipOrientation:Option< bool >, thisContours:Option<&meshlib::std_vector_std_vector_MR_EdgeId >, fromContours:Option<&meshlib::std_vector_std_vector_MR_EdgeId >, map:Option<&meshlib::PartMapping >, vacant:Option<&mut meshlib::VacantElements >) -> bool
auto clone_region (region:&meshlib::FaceBitSet, flipOrientation:Option< bool >, map:Option<&meshlib::PartMapping >) const -> meshlib::Owned< meshlib::Mesh >
void pack_2_mr_part_mapping (map:Option<&meshlib::PartMapping >, rearrangeTriangles:Option< bool >)
void pack_4 (outFmap:Option<&mut meshlib::FaceMap >, outVmap:Option<&mut meshlib::VertMap >, outEmap:Option<&mut meshlib::WholeEdgeMap >, rearrangeTriangles:Option< bool >)
auto pack_2_mr_pack_mapping (map:&meshlib::PackMapping, cb:Option<&meshlib::std_function_bool_from_float >) -> meshlib::Owned< meshlib::expected_void_std_string >
auto pack_optimally_1 (preserveAABBTree:Option< bool >) -> meshlib::Owned< meshlib::PackMapping >
auto pack_optimally_2 (preserveAABBTree:bool, cb:&meshlib::std_function_bool_from_float) -> meshlib::Owned< meshlib::expected_MR_PackMapping_std_string >
void delete_faces (fs:&meshlib::FaceBitSet, keepEdges:Option<&meshlib::UndirectedEdgeBitSet >)
auto delete_faces_find_vacant (fs:&meshlib::FaceBitSet, keepEdges:Option<&meshlib::UndirectedEdgeBitSet >) -> meshlib::Owned< meshlib::VacantElements >
auto project_point_5_mr_point_on_face (point:&meshlib::Vector3f, res:&mut meshlib::PointOnFace, maxDistSq:Option< f32 >, region:Option<&meshlib::FaceBitSet >, xf:Option<&meshlib::AffineXf3f >) const -> bool
auto project_point_5_mr_mesh_projection_result (point:&meshlib::Vector3f, res:&mut meshlib::MeshProjectionResult, maxDistSq:Option< f32 >, region:Option<&meshlib::FaceBitSet >, xf:Option<&meshlib::AffineXf3f >) const -> bool
auto find_closest_point_5 (point:&meshlib::Vector3f, res:&mut meshlib::MeshProjectionResult, maxDistSq:Option< f32 >, region:Option<&meshlib::FaceBitSet >, xf:Option<&meshlib::AffineXf3f >) const -> bool
auto project_point_4 (point:&meshlib::Vector3f, maxDistSq:Option< f32 >, region:Option<&meshlib::FaceBitSet >, xf:Option<&meshlib::AffineXf3f >) const -> meshlib::Owned< meshlib::MeshProjectionResult >
auto find_closest_point_4 (point:&meshlib::Vector3f, maxDistSq:Option< f32 >, region:Option<&meshlib::FaceBitSet >, xf:Option<&meshlib::AffineXf3f >) const -> meshlib::Owned< meshlib::MeshProjectionResult >
auto get_aabb_tree () const -> &meshlib::AABBTree
auto get_aabb_tree_not_create () const -> Option<&meshlib::AABBTree >
auto get_aabb_tree_points () const -> &meshlib::AABBTreePoints
auto get_aabb_tree_points_not_create () const -> Option<&meshlib::AABBTreePoints >
auto get_dipoles () const -> &meshlib::Dipoles
auto get_dipoles_not_create () const -> Option<&meshlib::Dipoles >
void invalidate_caches (pointsChanged:Option< bool >)
void update_caches (changedVerts:Option<&meshlib::VertBitSet >)
void update_caches_after_splits (new2Old:&meshlib::phmap::phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_std_pair_const_MR_FaceId_MR_FaceId)
void flip_orientation (fullComponents:Option<&meshlib::UndirectedEdgeBitSet >)
auto heap_bytes () const -> usize
void shrink_to_fit ()
void mirror (plane:&meshlib::Plane3f)
auto topology () const -> &meshlib::MeshTopology
auto topology_mut () -> &mut meshlib::MeshTopology
void set_topology (value:&meshlib::MeshTopology)
auto points () const -> &meshlib::VertCoords
auto points_mut () -> &mut meshlib::VertCoords
void set_points (value:&meshlib::VertCoords)

Static Public Member Functions

static auto new () -> meshlib::Owned< meshlib::Mesh >
static auto construct_from_another (_other:&meshlib::Mesh) -> meshlib::Owned< meshlib::Mesh >
static auto from_triangles (vertexCoordinates:&meshlib::VertCoords, t:&meshlib::Triangulation, settings:Option<&meshlib::mesh_builder::BuildSettings >, cb:Option<&meshlib::std_function_bool_from_float >) -> meshlib::Owned< meshlib::Mesh >
static auto from_tri_mesh (triMesh:&mut meshlib::TriMesh, settings:Option<&meshlib::mesh_builder::BuildSettings >, cb:Option<&meshlib::std_function_bool_from_float >) -> meshlib::Owned< meshlib::Mesh >
static auto from_triangles_duplicating_non_manifold_vertices (vertexCoordinates:&meshlib::VertCoords, t:&mut meshlib::Triangulation, dups:Option<&mut meshlib::std_vector_MR_MeshBuilder_VertDuplication >, settings:Option<&meshlib::mesh_builder::BuildSettings >, betterCont:Option<&meshlib::std_function_bool_from_MR_VertId_MR_VertId_MR_VertId_MR_VertId_MR_VertId >) -> meshlib::Owned< meshlib::Mesh >
static auto from_face_soup (vertexCoordinates:&meshlib::VertCoords, verts:&meshlib::std_vector_MR_VertId, faces:&meshlib::Vector_MR_MeshBuilder_VertSpan_MR_FaceId, settings:Option<&meshlib::mesh_builder::BuildSettings >, cb:Option<&meshlib::std_function_bool_from_float >) -> meshlib::Owned< meshlib::Mesh >
static auto from_point_triples (posTriples:&meshlib::std_vector_std_array_MR_Vector3f_3, duplicateNonManifoldVertices:bool) -> meshlib::Owned< meshlib::Mesh >
Static Public Member Functions inherited from meshlib::CppClass
static void destroy (ptr:*mut Self)
Static Public Member Functions inherited from meshlib::CppCopy
static auto copy (ptr:*const Self) -> *mut Self

Detailed Description

This class represents a mesh, including topology (connectivity) information and point coordinates, as well as some caches to accelerate search algorithms Generated from class MR::Mesh.

Generated from class MR::Mesh. Heap-allocated instances are held in Owned<Mesh>.

Member Function Documentation

◆ add_mesh()

void meshlib::Mesh::add_mesh ( from:&meshlib::Mesh ,
map:Option<&meshlib::PartMapping > ,
rearrangeTriangles:Option< bool >  )

appends another mesh as separate connected component(s) to this Generated from method MR::Mesh::addMesh.

Calls MR_Mesh_addMesh().

◆ add_mesh_out_maps()

void meshlib::Mesh::add_mesh_out_maps ( from:&meshlib::Mesh ,
outFmap:Option<&mut meshlib::FaceMap > ,
outVmap:Option<&mut meshlib::VertMap > ,
outEmap:Option<&mut meshlib::WholeEdgeMap > ,
rearrangeTriangles:Option< bool >  )

Generated from method MR::Mesh::addMesh.

Calls MR_Mesh_addMesh_outMaps().

◆ add_mesh_part()

auto meshlib::Mesh::add_mesh_part ( from:&meshlib::MeshPart ,
flipOrientation:Option< bool > ,
thisContours:Option<&meshlib::std_vector_std_vector_MR_EdgeId > ,
fromContours:Option<&meshlib::std_vector_std_vector_MR_EdgeId > ,
map:Option<&meshlib::PartMapping > ,
vacant:Option<&mut meshlib::VacantElements >  ) -> bool

appends whole or part of another mesh to this joining added faces with existed ones along given contours

Parameters
flipOrientationtrue means that every (from) triangle is inverted before adding optional
vacantcan be passed to copy elements not at the end, but over given ones, which the user guaranties to be free/lone
Returns
false if the given contours cannot be stitched, and this mesh is left unmodified then (the src2tgt mappings in (map) argument can be partially filled nevertheless) Generated from method MR::Mesh::addMeshPart.

Calls MR_Mesh_addMeshPart().

◆ add_mesh_part_mapping()

void meshlib::Mesh::add_mesh_part_mapping ( from:&meshlib::MeshPart ,
map:&meshlib::PartMapping ,
vacant:Option<&mut meshlib::VacantElements >  )

appends whole or part of another mesh as separate connected component(s) to this optional

Parameters
vacantcan be passed to copy elements not at the end, but over given ones, which the user guaranties to be free/lone Generated from method MR::Mesh::addMeshPart.

Calls MR_Mesh_addMeshPart_mapping().

◆ add_point()

auto meshlib::Mesh::add_point ( pos:&meshlib::Vector3f ) -> meshlib::VertId

creates new point and assigns given position to it Generated from method MR::Mesh::addPoint.

Calls MR_Mesh_addPoint().

◆ add_separate_contours()

auto meshlib::Mesh::add_separate_contours ( contours:&meshlib::std_vector_std_vector_MR_Vector3f ,
xf:Option<&meshlib::AffineXf3f >  ) -> meshlib::EdgeId

append points to mesh and connect them returns first EdgeId of new edges Generated from method MR::Mesh::addSeparateContours.

Calls MR_Mesh_addSeparateContours().

◆ add_separate_edge_loop()

auto meshlib::Mesh::add_separate_edge_loop ( contourPoints:&meshlib::std_vector_MR_Vector3f ) -> meshlib::EdgeId

append points to mesh and connect them as closed edge loop returns first EdgeId of new edges Generated from method MR::Mesh::addSeparateEdgeLoop.

Calls MR_Mesh_addSeparateEdgeLoop().

◆ area_const_mr_face_bit_set_ptr()

auto meshlib::Mesh::area_const_mr_face_bit_set_ptr ( fs:Option<&meshlib::FaceBitSet > ) const -> f64

computes the area of given face-region (or whole mesh) Generated from method MR::Mesh::area.

Calls MR_Mesh_area_const_MR_FaceBitSet_ptr().

◆ area_mr_face_id()

auto meshlib::Mesh::area_mr_face_id ( f:meshlib::FaceId ) const -> f32

returns the area of given face Generated from method MR::Mesh::area.

Calls MR_Mesh_area_MR_FaceId().

◆ assign_from_another()

auto meshlib::Mesh::assign_from_another ( _other:&meshlib::Mesh ) -> &mut meshlib::Mesh

Generated from method MR::Mesh::operator=.

Calls MR_Mesh_AssignFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in this object.

◆ attach_edge_loop_part()

void meshlib::Mesh::attach_edge_loop_part ( first:meshlib::EdgeId ,
last:meshlib::EdgeId ,
contourPoints:&meshlib::std_vector_MR_Vector3f  )

append points to mesh and connect them to given edges making edge loop first point connects with first edge dest last point connects with last edge org note that first and last edge should have no left face Generated from method MR::Mesh::attachEdgeLoopPart.

Calls MR_Mesh_attachEdgeLoopPart().

◆ average_edge_length()

auto meshlib::Mesh::average_edge_length ( ) const -> f32

computes average length of an edge in this mesh Generated from method MR::Mesh::averageEdgeLength.

Calls MR_Mesh_averageEdgeLength().

◆ calc_fast_winding_number()

auto meshlib::Mesh::calc_fast_winding_number ( pt:&meshlib::Vector3f ,
beta:Option< f32 >  ) const -> f32

computes generalized winding number in a point (pt), which is

  • for closed mesh with normals outside: 1 inside, 0 outside;
  • for planar mesh: 0.5 inside, -0.5 outside; and in general is equal to (portion of solid angle where inside part of mesh is observable) minus (portion of solid angle where outside part of mesh is observable)
    Parameters
    betadetermines the precision of fast approximation: the more the better, recommended value 2 or more Generated from method MR::Mesh::calcFastWindingNumber.
    Calls MR_Mesh_calcFastWindingNumber().

◆ circumcircle_diameter()

auto meshlib::Mesh::circumcircle_diameter ( f:meshlib::FaceId ) const -> f32

returns circumcircle diameter of given mesh triangle Generated from method MR::Mesh::circumcircleDiameter.

Calls MR_Mesh_circumcircleDiameter().

◆ circumcircle_diameter_sq()

auto meshlib::Mesh::circumcircle_diameter_sq ( f:meshlib::FaceId ) const -> f32

returns squared circumcircle diameter of given mesh triangle Generated from method MR::Mesh::circumcircleDiameterSq.

Calls MR_Mesh_circumcircleDiameterSq().

◆ clone_region()

auto meshlib::Mesh::clone_region ( region:&meshlib::FaceBitSet ,
flipOrientation:Option< bool > ,
map:Option<&meshlib::PartMapping >  ) const -> meshlib::Owned< meshlib::Mesh >

creates new mesh from given triangles of this mesh Generated from method MR::Mesh::cloneRegion.

Calls MR_Mesh_cloneRegion().

◆ compute_bounding_box()

auto meshlib::Mesh::compute_bounding_box ( toWorld:Option<&meshlib::AffineXf3f > ) const -> meshlib::Box3f

passes through all valid vertices and finds the minimal bounding box containing all of them; if toWorld transformation is given then returns minimal bounding box in world space Generated from method MR::Mesh::computeBoundingBox.

Calls MR_Mesh_computeBoundingBox().

◆ compute_bounding_box_region()

auto meshlib::Mesh::compute_bounding_box_region ( region:Option<&meshlib::FaceBitSet > ,
toWorld:Option<&meshlib::AffineXf3f >  ) const -> meshlib::Box3f

passes through all given faces (or whole mesh if region == null) and finds the minimal bounding box containing all of them if toWorld transformation is given then returns minimal bounding box in world space Generated from method MR::Mesh::computeBoundingBox.

Calls MR_Mesh_computeBoundingBox_region().

◆ construct_from_another()

auto meshlib::Mesh::construct_from_another ( _other:&meshlib::Mesh ) -> meshlib::Owned< meshlib::Mesh >
static

Generated from constructor MR::Mesh::Mesh.

Calls MR_Mesh_ConstructFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.

◆ cotan()

auto meshlib::Mesh::cotan ( ue:meshlib::UndirectedEdgeId ) const -> f32

computes sum of cotangents of the angle in the left and right triangles opposite to given edge, consider cotangents zero for not existing triangles Generated from method MR::Mesh::cotan.

Calls MR_Mesh_cotan().

◆ dbl_area_mr_face_id()

auto meshlib::Mesh::dbl_area_mr_face_id ( f:meshlib::FaceId ) const -> f32

returns twice the area of given face Generated from method MR::Mesh::dblArea.

Calls MR_Mesh_dblArea_MR_FaceId().

◆ dbl_area_mr_vert_id()

auto meshlib::Mesh::dbl_area_mr_vert_id ( v:meshlib::VertId ) const -> f32

computes the length of summed directed double areas of all triangles around given vertex Generated from method MR::Mesh::dblArea.

Calls MR_Mesh_dblArea_MR_VertId().

◆ delete_faces()

void meshlib::Mesh::delete_faces ( fs:&meshlib::FaceBitSet ,
keepEdges:Option<&meshlib::UndirectedEdgeBitSet >  )

deletes multiple given faces, also deletes adjacent edges and vertices if they were not shared by remaining faces and not in

Parameters
keepEdges;the edges that had no left and no right face before the call are not touched, see MeshTopology::deleteFaces Generated from method MR::Mesh::deleteFaces.

Calls MR_Mesh_deleteFaces().

◆ delete_faces_find_vacant()

auto meshlib::Mesh::delete_faces_find_vacant ( fs:&meshlib::FaceBitSet ,
keepEdges:Option<&meshlib::UndirectedEdgeBitSet >  ) -> meshlib::Owned< meshlib::VacantElements >

same as deleteFaces, but also makes lone all edges without faces in this mesh, and returns bit sets of all vacant elements in this mesh after deletion, see MeshTopology::deleteFacesFindVacant Generated from method MR::Mesh::deleteFacesFindVacant.

Calls MR_Mesh_deleteFacesFindVacant().

◆ dest_pnt()

auto meshlib::Mesh::dest_pnt ( e:meshlib::EdgeId ) const -> meshlib::Vector3f

returns coordinates of the edge destination Generated from method MR::Mesh::destPnt.

Calls MR_Mesh_destPnt().

◆ dihedral_angle()

auto meshlib::Mesh::dihedral_angle ( e:meshlib::UndirectedEdgeId ) const -> f32

given an edge between two triangular faces, computes the dihedral angle between them: 0 if both faces are in the same plane, positive if the faces form convex surface, negative if the faces form concave surface; please consider the usage of faster dihedralAngleSin(e) and dihedralAngleCos(e) Generated from method MR::Mesh::dihedralAngle.

Calls MR_Mesh_dihedralAngle().

◆ dihedral_angle_cos()

auto meshlib::Mesh::dihedral_angle_cos ( e:meshlib::UndirectedEdgeId ) const -> f32

given an edge between two triangular faces, computes cosine of dihedral angle between them: 1 if both faces are in the same plane, 0 if the surface makes right angle turn at the edge, -1 if the faces overlap one another Generated from method MR::Mesh::dihedralAngleCos.

Calls MR_Mesh_dihedralAngleCos().

◆ dihedral_angle_sin()

auto meshlib::Mesh::dihedral_angle_sin ( e:meshlib::UndirectedEdgeId ) const -> f32

given an edge between two triangular faces, computes sine of dihedral angle between them: 0 if both faces are in the same plane, positive if the faces form convex surface, negative if the faces form concave surface Generated from method MR::Mesh::dihedralAngleSin.

Calls MR_Mesh_dihedralAngleSin().

◆ dir_area()

auto meshlib::Mesh::dir_area ( fs:Option<&meshlib::FaceBitSet > ) const -> meshlib::Vector3d

computes the sum of directed areas for faces from given region (or whole mesh) Generated from method MR::Mesh::dirArea.

Calls MR_Mesh_dirArea().

◆ dir_dbl_area_mr_face_id()

auto meshlib::Mesh::dir_dbl_area_mr_face_id ( f:meshlib::FaceId ) const -> meshlib::Vector3f

computes directed double area for a triangular face from its vertices Generated from method MR::Mesh::dirDblArea.

Calls MR_Mesh_dirDblArea_MR_FaceId().

◆ dir_dbl_area_mr_vert_id()

auto meshlib::Mesh::dir_dbl_area_mr_vert_id ( v:meshlib::VertId ) const -> meshlib::Vector3f

computes sum of directed double areas of all triangles around given vertex Generated from method MR::Mesh::dirDblArea.

Calls MR_Mesh_dirDblArea_MR_VertId().

◆ discrete_gaussian_curvature()

auto meshlib::Mesh::discrete_gaussian_curvature ( v:meshlib::VertId ,
outBoundaryVert:Option<&mut bool >  ) const -> f32

computes discrete Gaussian curvature (or angle defect) at given vertex, which 0 in inner vertices on planar mesh parts and reaches 2*pi on needle's tip, see http://math.uchicago.edu/~may/REU2015/REUPapers/Upadhyay.pdf optionally returns whether the vertex is on boundary Generated from method MR::Mesh::discreteGaussianCurvature.

Calls MR_Mesh_discreteGaussianCurvature().

◆ discrete_gaussian_curvatures()

auto meshlib::Mesh::discrete_gaussian_curvatures ( region:Option<&meshlib::VertBitSet > ) const -> meshlib::Owned< meshlib::VertScalars >

computes discrete Gaussian curvature (see discreteGaussianCurvature( v )) in the vertices of given region (or in all valid vertices if region is null), and puts 0 in all other vertices Generated from method MR::Mesh::discreteGaussianCurvatures.

Calls MR_Mesh_discreteGaussianCurvatures().

◆ discrete_mean_curvature_mr_undirected_edge_id()

auto meshlib::Mesh::discrete_mean_curvature_mr_undirected_edge_id ( e:meshlib::UndirectedEdgeId ) const -> f32

computes discrete mean curvature in given edge, measures in length^-1; 0 for planar regions, positive for convex surface, negative for concave surface Generated from method MR::Mesh::discreteMeanCurvature.

Calls MR_Mesh_discreteMeanCurvature_MR_UndirectedEdgeId().

◆ discrete_mean_curvature_mr_vert_id()

auto meshlib::Mesh::discrete_mean_curvature_mr_vert_id ( v:meshlib::VertId ) const -> f32

computes discrete mean curvature in given vertex, measures in length^-1; 0 for planar regions, positive for convex surface, negative for concave surface Generated from method MR::Mesh::discreteMeanCurvature.

Calls MR_Mesh_discreteMeanCurvature_MR_VertId().

◆ discrete_mean_curvatures()

auto meshlib::Mesh::discrete_mean_curvatures ( region:Option<&meshlib::VertBitSet > ) const -> meshlib::Owned< meshlib::VertScalars >

computes discrete mean curvature (see discreteMeanCurvature( v )) in the vertices of given region (or in all valid vertices if region is null), and puts 0 in all other vertices Generated from method MR::Mesh::discreteMeanCurvatures.

Calls MR_Mesh_discreteMeanCurvatures().

◆ edge_center()

auto meshlib::Mesh::edge_center ( e:meshlib::UndirectedEdgeId ) const -> meshlib::Vector3f

computes the center of given edge Generated from method MR::Mesh::edgeCenter.

Calls MR_Mesh_edgeCenter().

◆ edge_length()

auto meshlib::Mesh::edge_length ( e:meshlib::UndirectedEdgeId ) const -> f32

returns Euclidean length of the edge Generated from method MR::Mesh::edgeLength.

Calls MR_Mesh_edgeLength().

◆ edge_length_sq()

auto meshlib::Mesh::edge_length_sq ( e:meshlib::UndirectedEdgeId ) const -> f32

returns squared Euclidean length of the edge (faster to compute than length) Generated from method MR::Mesh::edgeLengthSq.

Calls MR_Mesh_edgeLengthSq().

◆ edge_lengths()

auto meshlib::Mesh::edge_lengths ( ) const -> meshlib::Owned< meshlib::UndirectedEdgeScalars >

computes and returns the lengths of all edges in the mesh Generated from method MR::Mesh::edgeLengths.

Calls MR_Mesh_edgeLengths().

◆ edge_point_1()

auto meshlib::Mesh::edge_point_1 ( ep:&meshlib::EdgePoint ) const -> meshlib::Vector3f

computes coordinates of point given as edge and relative position on it Generated from method MR::Mesh::edgePoint.

Calls MR_Mesh_edgePoint_1().

◆ edge_point_2()

auto meshlib::Mesh::edge_point_2 ( e:meshlib::EdgeId ,
f:f32  ) const -> meshlib::Vector3f

returns a point on the edge: origin point for f=0 and destination point for f=1 Generated from method MR::Mesh::edgePoint.

Calls MR_Mesh_edgePoint_2().

◆ edge_segment()

auto meshlib::Mesh::edge_segment ( e:meshlib::EdgeId ) const -> meshlib::Owned< meshlib::LineSegm3f >

returns line segment of given edge Generated from method MR::Mesh::edgeSegment.

Calls MR_Mesh_edgeSegment().

◆ edge_vector()

auto meshlib::Mesh::edge_vector ( e:meshlib::EdgeId ) const -> meshlib::Vector3f

returns vector equal to edge destination point minus edge origin point Generated from method MR::Mesh::edgeVector.

Calls MR_Mesh_edgeVector().

◆ find_center_from_b_box()

auto meshlib::Mesh::find_center_from_b_box ( ) const -> meshlib::Vector3f

computes bounding box and returns its center Generated from method MR::Mesh::findCenterFromBBox.

Calls MR_Mesh_findCenterFromBBox().

◆ find_center_from_faces()

auto meshlib::Mesh::find_center_from_faces ( ) const -> meshlib::Vector3f

computes center of mass considering that density of all triangles is the same Generated from method MR::Mesh::findCenterFromFaces.

Calls MR_Mesh_findCenterFromFaces().

◆ find_center_from_points()

auto meshlib::Mesh::find_center_from_points ( ) const -> meshlib::Vector3f

computes average position of all valid mesh vertices Generated from method MR::Mesh::findCenterFromPoints.

Calls MR_Mesh_findCenterFromPoints().

◆ find_closest_point_4()

auto meshlib::Mesh::find_closest_point_4 ( point:&meshlib::Vector3f ,
maxDistSq:Option< f32 > ,
region:Option<&meshlib::FaceBitSet > ,
xf:Option<&meshlib::AffineXf3f >  ) const -> meshlib::Owned< meshlib::MeshProjectionResult >

Generated from method MR::Mesh::findClosestPoint.

Calls MR_Mesh_findClosestPoint_4().

◆ find_closest_point_5()

auto meshlib::Mesh::find_closest_point_5 ( point:&meshlib::Vector3f ,
res:&mut meshlib::MeshProjectionResult ,
maxDistSq:Option< f32 > ,
region:Option<&meshlib::FaceBitSet > ,
xf:Option<&meshlib::AffineXf3f >  ) const -> bool

Generated from method MR::Mesh::findClosestPoint.

Calls MR_Mesh_findClosestPoint_5().

◆ find_crease_edges()

auto meshlib::Mesh::find_crease_edges ( angleFromPlanar:f32 ) const -> meshlib::Owned< meshlib::UndirectedEdgeBitSet >

finds all mesh edges where dihedral angle is distinct from planar PI angle on at least given value Generated from method MR::Mesh::findCreaseEdges.

Calls MR_Mesh_findCreaseEdges().

◆ find_sharp_edges()

auto meshlib::Mesh::find_sharp_edges ( minSharpCos:f32 ,
maxSharpCos:f32  ) const -> meshlib::Owned< meshlib::UndirectedEdgeBitSet >

finds all mesh edges with the cosine of dihedral angle (see dihedralAngleCos) in [minSharpCos, maxSharpCos] Generated from method MR::Mesh::findSharpEdges.

Calls MR_Mesh_findSharpEdges().

◆ find_spike_vertices()

auto meshlib::Mesh::find_spike_vertices ( minSumAngle:f32 ,
region:Option<&meshlib::VertBitSet > ,
cb:Option<&meshlib::std_function_bool_from_float >  ) const -> meshlib::Owned< meshlib::expected_MR_VertBitSet_std_string >

returns vertices where the sum of triangle angles is below given threshold Generated from method MR::Mesh::findSpikeVertices.

Calls MR_Mesh_findSpikeVertices().

◆ flip_orientation()

void meshlib::Mesh::flip_orientation ( fullComponents:Option<&meshlib::UndirectedEdgeBitSet > )

changes the orientation of all triangles, or only of the components with given edges as MeshTopology::flipOrientation() does, and updates existing AABB tree instead of rebuilding it Generated from method MR::Mesh::flipOrientation.

Calls MR_Mesh_flipOrientation().

◆ from_face_soup()

auto meshlib::Mesh::from_face_soup ( vertexCoordinates:&meshlib::VertCoords ,
verts:&meshlib::std_vector_MR_VertId ,
faces:&meshlib::Vector_MR_MeshBuilder_VertSpan_MR_FaceId ,
settings:Option<&meshlib::mesh_builder::BuildSettings > ,
cb:Option<&meshlib::std_function_bool_from_float >  ) -> meshlib::Owned< meshlib::Mesh >
static

construct mesh from vertex coordinates and construct mesh topology from face soup, where each face can have arbitrary degree (not only triangles); all non-triangular faces will be automatically subdivided on triangles Generated from method MR::Mesh::fromFaceSoup.

Calls MR_Mesh_fromFaceSoup().

◆ from_point_triples()

auto meshlib::Mesh::from_point_triples ( posTriples:&meshlib::std_vector_std_array_MR_Vector3f_3 ,
duplicateNonManifoldVertices:bool  ) -> meshlib::Owned< meshlib::Mesh >
static

construct mesh from point triples;

Parameters
duplicateNonManifoldVertices= false, all coinciding points are given the same VertId in the result; duplicateNonManifoldVertices = true, it tries to avoid non-manifold vertices by creating duplicate vertices with same coordinates Generated from method MR::Mesh::fromPointTriples.

Calls MR_Mesh_fromPointTriples().

◆ from_tri_mesh()

auto meshlib::Mesh::from_tri_mesh ( triMesh:&mut meshlib::TriMesh ,
settings:Option<&meshlib::mesh_builder::BuildSettings > ,
cb:Option<&meshlib::std_function_bool_from_float >  ) -> meshlib::Owned< meshlib::Mesh >
static

construct mesh from TriMesh representation Generated from method MR::Mesh::fromTriMesh.

Calls MR_Mesh_fromTriMesh().

◆ from_triangles()

auto meshlib::Mesh::from_triangles ( vertexCoordinates:&meshlib::VertCoords ,
t:&meshlib::Triangulation ,
settings:Option<&meshlib::mesh_builder::BuildSettings > ,
cb:Option<&meshlib::std_function_bool_from_float >  ) -> meshlib::Owned< meshlib::Mesh >
static

construct mesh from vertex coordinates and a set of triangles with given ids Generated from method MR::Mesh::fromTriangles.

Calls MR_Mesh_fromTriangles().

◆ from_triangles_duplicating_non_manifold_vertices()

auto meshlib::Mesh::from_triangles_duplicating_non_manifold_vertices ( vertexCoordinates:&meshlib::VertCoords ,
t:&mut meshlib::Triangulation ,
dups:Option<&mut meshlib::std_vector_MR_MeshBuilder_VertDuplication > ,
settings:Option<&meshlib::mesh_builder::BuildSettings > ,
betterCont:Option<&meshlib::std_function_bool_from_MR_VertId_MR_VertId_MR_VertId_MR_VertId_MR_VertId >  ) -> meshlib::Owned< meshlib::Mesh >
static

construct mesh from vertex coordinates and a set of triangles with given ids; unlike simple fromTriangles() it tries to resolve non-manifold vertices by creating duplicate vertices; betterCont (if given) selects the best triangle among several possible continuations during the duplication Generated from method MR::Mesh::fromTrianglesDuplicatingNonManifoldVertices.

Calls MR_Mesh_fromTrianglesDuplicatingNonManifoldVertices().

◆ get_aabb_tree()

auto meshlib::Mesh::get_aabb_tree ( ) const -> &meshlib::AABBTree

returns cached aabb-tree of this mesh's triangles, creating it if it did not exist in a thread-safe manner Generated from method MR::Mesh::getAABBTree.

Calls MR_Mesh_getAABBTree().

◆ get_aabb_tree_not_create()

auto meshlib::Mesh::get_aabb_tree_not_create ( ) const -> Option<&meshlib::AABBTree >

returns cached aabb-tree of this mesh's triangles, but does not create it if it did not exist Generated from method MR::Mesh::getAABBTreeNotCreate.

Calls MR_Mesh_getAABBTreeNotCreate().

◆ get_aabb_tree_points()

auto meshlib::Mesh::get_aabb_tree_points ( ) const -> &meshlib::AABBTreePoints

returns cached aabb-tree for points of this mesh, creating it if it did not exist in a thread-safe manner Generated from method MR::Mesh::getAABBTreePoints.

Calls MR_Mesh_getAABBTreePoints().

◆ get_aabb_tree_points_not_create()

auto meshlib::Mesh::get_aabb_tree_points_not_create ( ) const -> Option<&meshlib::AABBTreePoints >

returns cached aabb-tree for points of this mesh, but does not create it if it did not exist Generated from method MR::Mesh::getAABBTreePointsNotCreate.

Calls MR_Mesh_getAABBTreePointsNotCreate().

◆ get_bounding_box()

auto meshlib::Mesh::get_bounding_box ( ) const -> meshlib::Box3f

returns the bounding box containing all valid vertices (the root box of AABBTree) this bounding box is insignificantly bigger that minimal box due to AABB algorithms precision Generated from method MR::Mesh::getBoundingBox.

Calls MR_Mesh_getBoundingBox().

◆ get_closest_edge_mr_mesh_tri_point()

auto meshlib::Mesh::get_closest_edge_mr_mesh_tri_point ( p:&meshlib::MeshTriPoint ) const -> meshlib::UndirectedEdgeId

returns one of three face edges, closest to given point Generated from method MR::Mesh::getClosestEdge.

Calls MR_Mesh_getClosestEdge_MR_MeshTriPoint().

◆ get_closest_edge_mr_point_on_face()

auto meshlib::Mesh::get_closest_edge_mr_point_on_face ( p:&meshlib::PointOnFace ) const -> meshlib::UndirectedEdgeId

returns one of three face edges, closest to given point Generated from method MR::Mesh::getClosestEdge.

Calls MR_Mesh_getClosestEdge_MR_PointOnFace().

◆ get_closest_vertex_mr_mesh_tri_point()

auto meshlib::Mesh::get_closest_vertex_mr_mesh_tri_point ( p:&meshlib::MeshTriPoint ) const -> meshlib::VertId

returns one of three face vertices, closest to given point Generated from method MR::Mesh::getClosestVertex.

Calls MR_Mesh_getClosestVertex_MR_MeshTriPoint().

◆ get_closest_vertex_mr_point_on_face()

auto meshlib::Mesh::get_closest_vertex_mr_point_on_face ( p:&meshlib::PointOnFace ) const -> meshlib::VertId

returns one of three face vertices, closest to given point Generated from method MR::Mesh::getClosestVertex.

Calls MR_Mesh_getClosestVertex_MR_PointOnFace().

◆ get_dipoles()

auto meshlib::Mesh::get_dipoles ( ) const -> &meshlib::Dipoles

returns cached dipoles of aabb-tree nodes for this mesh, creating it if it did not exist in a thread-safe manner Generated from method MR::Mesh::getDipoles.

Calls MR_Mesh_getDipoles().

◆ get_dipoles_not_create()

auto meshlib::Mesh::get_dipoles_not_create ( ) const -> Option<&meshlib::Dipoles >

returns cached dipoles of aabb-tree nodes for this mesh, but does not create it if it did not exist Generated from method MR::Mesh::getDipolesNotCreate.

Calls MR_Mesh_getDipolesNotCreate().

◆ get_left_tri_points_1()

auto meshlib::Mesh::get_left_tri_points_1 ( e:meshlib::EdgeId ) const -> meshlib::std_array_MR_Vector3f_3

returns three points of left face of e: res[0] = orgPnt( e ), res[1] = destPnt( e ) Generated from method MR::Mesh::getLeftTriPoints.

Calls MR_Mesh_getLeftTriPoints_1().

◆ get_left_tri_points_4()

void meshlib::Mesh::get_left_tri_points_4 ( e:meshlib::EdgeId ,
v0:&mut meshlib::Vector3f ,
v1:&mut meshlib::Vector3f ,
v2:&mut meshlib::Vector3f  ) const

returns three points of left face of e: v0 = orgPnt( e ), v1 = destPnt( e ) Generated from method MR::Mesh::getLeftTriPoints.

Calls MR_Mesh_getLeftTriPoints_4().

◆ get_plane3d()

auto meshlib::Mesh::get_plane3d ( f:meshlib::FaceId ) const -> meshlib::Owned< meshlib::Plane3d >

Generated from method MR::Mesh::getPlane3d.

Calls MR_Mesh_getPlane3d().

◆ get_plane3f()

auto meshlib::Mesh::get_plane3f ( f:meshlib::FaceId ) const -> meshlib::Owned< meshlib::Plane3f >

returns the plane containing given triangular face with normal looking outwards Generated from method MR::Mesh::getPlane3f.

Calls MR_Mesh_getPlane3f().

◆ get_tri_points_1()

auto meshlib::Mesh::get_tri_points_1 ( f:meshlib::FaceId ) const -> meshlib::std_array_MR_Vector3f_3

returns three points of given face Generated from method MR::Mesh::getTriPoints.

Calls MR_Mesh_getTriPoints_1().

◆ get_tri_points_4()

void meshlib::Mesh::get_tri_points_4 ( f:meshlib::FaceId ,
v0:&mut meshlib::Vector3f ,
v1:&mut meshlib::Vector3f ,
v2:&mut meshlib::Vector3f  ) const

returns three points of given face Generated from method MR::Mesh::getTriPoints.

Calls MR_Mesh_getTriPoints_4().

◆ heap_bytes()

auto meshlib::Mesh::heap_bytes ( ) const -> usize

returns the amount of memory this object occupies on heap Generated from method MR::Mesh::heapBytes.

Calls MR_Mesh_heapBytes().

◆ hole_dir_area()

auto meshlib::Mesh::hole_dir_area ( e:meshlib::EdgeId ) const -> meshlib::Vector3d

computes directed area of the hole specified by one of its edges with no valid left face (left is hole); if the hole is planar then returned vector is orthogonal to the plane pointing outside and its magnitude is equal to hole area Generated from method MR::Mesh::holeDirArea.

Calls MR_Mesh_holeDirArea().

◆ hole_perimeter()

auto meshlib::Mesh::hole_perimeter ( e:meshlib::EdgeId ) const -> f64

computes the perimeter of the hole specified by one of its edges with no valid left face (left is hole) Generated from method MR::Mesh::holePerimeter.

Calls MR_Mesh_holePerimeter().

◆ invalidate_caches()

void meshlib::Mesh::invalidate_caches ( pointsChanged:Option< bool > )

invalidates caches (aabb-trees) after any change in mesh geometry or topology

Parameters
pointsChangedspecifies whether points have changed (otherwise only topology has changed) Generated from method MR::Mesh::invalidateCaches.

Calls MR_Mesh_invalidateCaches().

◆ is_outside()

auto meshlib::Mesh::is_outside ( pt:&meshlib::Vector3f ,
windingNumberThreshold:Option< f32 > ,
beta:Option< f32 >  ) const -> bool

computes whether a point (pt) is located outside the object surrounded by this mesh using generalized winding number

Parameters
betadetermines the precision of winding number computation: the more the better, recommended value 2 or more Generated from method MR::Mesh::isOutside.

Calls MR_Mesh_isOutside().

◆ is_outside_by_proj_norm()

auto meshlib::Mesh::is_outside_by_proj_norm ( pt:&meshlib::Vector3f ,
proj:&meshlib::MeshProjectionResult ,
region:Option<&meshlib::FaceBitSet >  ) const -> bool

computes whether a point (pt) is located outside the object surrounded by this mesh using pseudonormal at the closest point to in on mesh (proj); this method works much faster than isOutside but can return wrong sign if the closest point is located on self-intersecting part of the mesh Generated from method MR::Mesh::isOutsideByProjNorm.

Calls MR_Mesh_isOutsideByProjNorm().

◆ left_cotan()

auto meshlib::Mesh::left_cotan ( e:meshlib::EdgeId ) const -> f32

computes cotangent of the angle in the left( e ) triangle opposite to e, and returns 0 if left face does not exist Generated from method MR::Mesh::leftCotan.

Calls MR_Mesh_leftCotan().

◆ left_dir_dbl_area()

auto meshlib::Mesh::left_dir_dbl_area ( e:meshlib::EdgeId ) const -> meshlib::Vector3f

computes directed double area of left triangular face of given edge Generated from method MR::Mesh::leftDirDblArea.

Calls MR_Mesh_leftDirDblArea().

◆ left_normal()

auto meshlib::Mesh::left_normal ( e:meshlib::EdgeId ) const -> meshlib::Vector3f

computes triangular face normal from its vertices Generated from method MR::Mesh::leftNormal.

Calls MR_Mesh_leftNormal().

◆ left_tangent()

auto meshlib::Mesh::left_tangent ( e:meshlib::EdgeId ) const -> meshlib::Vector3f

computes unit vector that is both orthogonal to given edge and to the normal of its left triangle, the vector is directed inside left triangle Generated from method MR::Mesh::leftTangent.

Calls MR_Mesh_leftTangent().

◆ mirror()

void meshlib::Mesh::mirror ( plane:&meshlib::Plane3f )

reflects the mesh from a given plane Generated from method MR::Mesh::mirror.

Calls MR_Mesh_mirror().

◆ new()

auto meshlib::Mesh::new ( ) -> meshlib::Owned< meshlib::Mesh >
static

Constructs an empty (default-constructed) instance.

Calls MR_Mesh_DefaultConstruct().

◆ normal_mr_face_id()

auto meshlib::Mesh::normal_mr_face_id ( f:meshlib::FaceId ) const -> meshlib::Vector3f

computes triangular face normal from its vertices Generated from method MR::Mesh::normal.

Calls MR_Mesh_normal_MR_FaceId().

◆ normal_mr_mesh_tri_point()

auto meshlib::Mesh::normal_mr_mesh_tri_point ( p:&meshlib::MeshTriPoint ) const -> meshlib::Vector3f

computes normal in three vertices of p's triangle, then interpolates them using barycentric coordinates and normalizes again; this is the same normal as in rendering with smooth shading Generated from method MR::Mesh::normal.

Calls MR_Mesh_normal_MR_MeshTriPoint().

◆ normal_mr_vert_id()

auto meshlib::Mesh::normal_mr_vert_id ( v:meshlib::VertId ) const -> meshlib::Vector3f

computes normal in a vertex using sum of directed areas of neighboring triangles Generated from method MR::Mesh::normal.

Calls MR_Mesh_normal_MR_VertId().

◆ op_equal()

auto meshlib::Mesh::op_equal ( b:&meshlib::Mesh ) const -> bool

compare that two meshes are exactly the same Generated from method MR::Mesh::operator==.

Calls MR_equal_MR_Mesh().

◆ op_not_equal()

auto meshlib::Mesh::op_not_equal ( b:&meshlib::Mesh ) const -> bool

compare that two meshes are exactly the same Generated from method MR::Mesh::operator!=.

Calls MR_not_equal_MR_Mesh().

◆ org_pnt()

auto meshlib::Mesh::org_pnt ( e:meshlib::EdgeId ) const -> meshlib::Vector3f

returns coordinates of the edge origin Generated from method MR::Mesh::orgPnt.

Calls MR_Mesh_orgPnt().

◆ pack_2_mr_pack_mapping()

auto meshlib::Mesh::pack_2_mr_pack_mapping ( map:&meshlib::PackMapping ,
cb:Option<&meshlib::std_function_bool_from_float >  ) -> meshlib::Owned< meshlib::expected_void_std_string >

tightly packs all arrays eliminating lone edges and invalid faces, vertices and points, reorder all faces, vertices and edges according to given maps, each containing old id -> new id mapping Generated from method MR::Mesh::pack.

Calls MR_Mesh_pack_2_MR_PackMapping().

◆ pack_2_mr_part_mapping()

void meshlib::Mesh::pack_2_mr_part_mapping ( map:Option<&meshlib::PartMapping > ,
rearrangeTriangles:Option< bool >  )

tightly packs all arrays eliminating lone edges and invalid faces, vertices and points Generated from method MR::Mesh::pack.

Calls MR_Mesh_pack_2_MR_PartMapping().

◆ pack_4()

void meshlib::Mesh::pack_4 ( outFmap:Option<&mut meshlib::FaceMap > ,
outVmap:Option<&mut meshlib::VertMap > ,
outEmap:Option<&mut meshlib::WholeEdgeMap > ,
rearrangeTriangles:Option< bool >  )

Generated from method MR::Mesh::pack.

Calls MR_Mesh_pack_4().

◆ pack_optimally_1()

auto meshlib::Mesh::pack_optimally_1 ( preserveAABBTree:Option< bool > ) -> meshlib::Owned< meshlib::PackMapping >

packs tightly and rearranges vertices, triangles and edges to put close in space elements in close indices

Parameters
preserveAABBTreewhether to keep valid mesh's AABB tree after return (it will take longer to compute and it will occupy more memory); an already constructed tree is used for faster ordering of faces in any case Generated from method MR::Mesh::packOptimally.

Calls MR_Mesh_packOptimally_1().

◆ pack_optimally_2()

auto meshlib::Mesh::pack_optimally_2 ( preserveAABBTree:bool ,
cb:&meshlib::std_function_bool_from_float  ) -> meshlib::Owned< meshlib::expected_MR_PackMapping_std_string >

Generated from method MR::Mesh::packOptimally.

Calls MR_Mesh_packOptimally_2().

◆ points()

auto meshlib::Mesh::points ( ) const -> &meshlib::VertCoords

Returns a pointer to a member variable of class MR::Mesh named points.

Calls MR_Mesh_Get_points(). The reference to this object might be preserved as the return value.

◆ points_mut()

auto meshlib::Mesh::points_mut ( ) -> &mut meshlib::VertCoords

Returns a mutable pointer to a member variable of class MR::Mesh named points.

Calls MR_Mesh_GetMutable_points(). The reference to this object might be preserved as the return value.

◆ proj_area()

auto meshlib::Mesh::proj_area ( dir:&meshlib::Vector3f ,
fs:Option<&meshlib::FaceBitSet >  ) const -> f64

computes the sum of absolute projected area of faces from given region (or whole mesh) as visible if look from given direction Generated from method MR::Mesh::projArea.

Calls MR_Mesh_projArea().

◆ project_point_4()

auto meshlib::Mesh::project_point_4 ( point:&meshlib::Vector3f ,
maxDistSq:Option< f32 > ,
region:Option<&meshlib::FaceBitSet > ,
xf:Option<&meshlib::AffineXf3f >  ) const -> meshlib::Owned< meshlib::MeshProjectionResult >

finds the closest mesh point on this mesh (or its region) to given point;

Parameters
pointsource location to look the closest to
maxDistSqsearch only in the ball with sqrt(maxDistSq) radius around given point, smaller value here increases performance
xfis mesh-to-point transformation, if not specified then identity transformation is assumed and works much faster;
Returns
found closest point including Euclidean coordinates, barycentric coordinates, FaceId and squared distance to point or std::nullopt if no mesh point is found in the ball with sqrt(maxDistSq) radius around given point Generated from method MR::Mesh::projectPoint.

Calls MR_Mesh_projectPoint_4().

◆ project_point_5_mr_mesh_projection_result()

auto meshlib::Mesh::project_point_5_mr_mesh_projection_result ( point:&meshlib::Vector3f ,
res:&mut meshlib::MeshProjectionResult ,
maxDistSq:Option< f32 > ,
region:Option<&meshlib::FaceBitSet > ,
xf:Option<&meshlib::AffineXf3f >  ) const -> bool

finds the closest mesh point on this mesh (or its region) to given point;

Parameters
pointsource location to look the closest to
resfound closest point including Euclidean coordinates, barycentric coordinates, FaceId and squared distance to point
maxDistSqsearch only in the ball with sqrt(maxDistSq) radius around given point, smaller value here increases performance
xfis mesh-to-point transformation, if not specified then identity transformation is assumed and works much faster;
Returns
false if no mesh point is found in the ball with sqrt(maxDistSq) radius around given point Generated from method MR::Mesh::projectPoint.

Calls MR_Mesh_projectPoint_5_MR_MeshProjectionResult().

◆ project_point_5_mr_point_on_face()

auto meshlib::Mesh::project_point_5_mr_point_on_face ( point:&meshlib::Vector3f ,
res:&mut meshlib::PointOnFace ,
maxDistSq:Option< f32 > ,
region:Option<&meshlib::FaceBitSet > ,
xf:Option<&meshlib::AffineXf3f >  ) const -> bool

finds the closest mesh point on this mesh (or its region) to given point;

Parameters
pointsource location to look the closest to
resfound closest point including Euclidean coordinates and FaceId
maxDistSqsearch only in the ball with sqrt(maxDistSq) radius around given point, smaller value here increases performance
xfis mesh-to-point transformation, if not specified then identity transformation is assumed and works much faster;
Returns
false if no mesh point is found in the ball with sqrt(maxDistSq) radius around given point Generated from method MR::Mesh::projectPoint.

Calls MR_Mesh_projectPoint_5_MR_PointOnFace().

◆ pseudonormal_mr_mesh_tri_point()

auto meshlib::Mesh::pseudonormal_mr_mesh_tri_point ( p:&meshlib::MeshTriPoint ,
region:Option<&meshlib::FaceBitSet >  ) const -> meshlib::Vector3f

returns pseudonormal in corresponding face/edge/vertex for signed distance calculation as suggested in the article "Signed Distance Computation Using the Angle Weighted Pseudonormal" by J. Andreas Baerentzen and Henrik Aanaes, https://backend.orbit.dtu.dk/ws/portalfiles/portal/3977815/B_rentzen.pdf unlike normal( const MeshTriPoint & p ), this is not a smooth function Generated from method MR::Mesh::pseudonormal.

Calls MR_Mesh_pseudonormal_MR_MeshTriPoint().

◆ pseudonormal_mr_undirected_edge_id()

auto meshlib::Mesh::pseudonormal_mr_undirected_edge_id ( e:meshlib::UndirectedEdgeId ,
region:Option<&meshlib::FaceBitSet >  ) const -> meshlib::Vector3f

computes normalized half sum of face normals sharing given edge (only (region) faces will be considered); Generated from method MR::Mesh::pseudonormal.

Calls MR_Mesh_pseudonormal_MR_UndirectedEdgeId().

◆ pseudonormal_mr_vert_id()

auto meshlib::Mesh::pseudonormal_mr_vert_id ( v:meshlib::VertId ,
region:Option<&meshlib::FaceBitSet >  ) const -> meshlib::Vector3f

computes angle-weighted sum of normals of incident faces of given vertex (only (region) faces will be considered); the sum is normalized before returning Generated from method MR::Mesh::pseudonormal.

Calls MR_Mesh_pseudonormal_MR_VertId().

◆ quadratic_form()

auto meshlib::Mesh::quadratic_form ( v:meshlib::VertId ,
angleWeigted:bool ,
region:Option<&meshlib::FaceBitSet > ,
creases:Option<&meshlib::UndirectedEdgeBitSet >  ) const -> meshlib::Owned< meshlib::QuadraticForm3f >

computes quadratic form in the vertex as the sum of squared distances from 1) planes of adjacent triangles, with the weight equal to the angle of adjacent triangle at this vertex divided on PI in case of angleWeigted=true; 2) lines of adjacent boundary and crease edges Generated from method MR::Mesh::quadraticForm.

Calls MR_Mesh_quadraticForm().

◆ set_points()

void meshlib::Mesh::set_points ( value:&meshlib::VertCoords )

Modifies a member variable of class MR::Mesh named points.

Calls MR_Mesh_Set_points(). The reference to the parameter value might be preserved in this object in element points.

◆ set_topology()

void meshlib::Mesh::set_topology ( value:&meshlib::MeshTopology )

Modifies a member variable of class MR::Mesh named topology.

Calls MR_Mesh_Set_topology(). The reference to the parameter value might be preserved in this object in element topology.

◆ shrink_to_fit()

void meshlib::Mesh::shrink_to_fit ( )

requests the removal of unused capacity Generated from method MR::Mesh::shrinkToFit.

Calls MR_Mesh_shrinkToFit().

◆ signed_distance_1()

auto meshlib::Mesh::signed_distance_1 ( pt:&meshlib::Vector3f ) const -> f32

given a point (pt) in 3D, computes the closest point on mesh, and

Returns
signed distance from pt to mesh: positive value - outside mesh, negative - inside mesh; this method can return wrong sign if the closest point is located on self-intersecting part of the mesh Generated from method MR::Mesh::signedDistance.

Calls MR_Mesh_signedDistance_1().

◆ signed_distance_3_float()

auto meshlib::Mesh::signed_distance_3_float ( pt:&meshlib::Vector3f ,
maxDistSq:f32 ,
region:Option<&meshlib::FaceBitSet >  ) const -> meshlib::Owned< meshlib::std_optional_float >

given a point (pt) in 3D, computes the closest point on mesh, and

Returns
signed distance from pt to mesh: positive value - outside mesh, negative - inside mesh; or std::nullopt if the projection point is not within maxDist; this method can return wrong sign if the closest point is located on self-intersecting part of the mesh Generated from method MR::Mesh::signedDistance.

Calls MR_Mesh_signedDistance_3_float().

◆ signed_distance_3_mr_mesh_projection_result()

auto meshlib::Mesh::signed_distance_3_mr_mesh_projection_result ( pt:&meshlib::Vector3f ,
proj:&meshlib::MeshProjectionResult ,
region:Option<&meshlib::FaceBitSet >  ) const -> f32

given a point (pt) in 3D and the closest point to in on mesh (proj),

Returns
signed distance from pt to mesh: positive value - outside mesh, negative - inside mesh; this method can return wrong sign if the closest point is located on self-intersecting part of the mesh Generated from method MR::Mesh::signedDistance.

Calls MR_Mesh_signedDistance_3_MR_MeshProjectionResult().

◆ split_edge_3()

same, but split given edge on two equal parts Generated from method MR::Mesh::splitEdge.

Calls MR_Mesh_splitEdge_3().

◆ split_edge_4()

split given edge on two parts: dest(returned-edge) = org(e) - newly created vertex, org(returned-edge) = org(e-before-split), dest(e) = dest(e-before-split)

left and right faces of given edge if valid are also subdivided on two parts each; the split edge will keep both face IDs and their degrees, and the new edge will have new face IDs and new faces are triangular; if left or right faces of the original edge were in the region, then include new parts of these faces in the region

Parameters
new2Oldreceive mapping from newly appeared triangle to its original triangle (part to full) Generated from method MR::Mesh::splitEdge.

Calls MR_Mesh_splitEdge_4().

◆ split_face_3()

same, putting new vertex in the centroid of original triangle Generated from method MR::Mesh::splitFace.

Calls MR_Mesh_splitFace_3().

◆ split_face_4()

split given triangle on three triangles, introducing new vertex with given coordinates and connecting it to original triangle vertices; if region is given, then it must include (f) and new faces will be added there as well

Parameters
new2Oldreceive mapping from newly appeared triangle to its original triangle (part to full) Generated from method MR::Mesh::splitFace.

Calls MR_Mesh_splitFace_4().

◆ sum_angles()

auto meshlib::Mesh::sum_angles ( v:meshlib::VertId ,
outBoundaryVert:Option<&mut bool >  ) const -> f32

computes the sum of triangle angles at given vertex; optionally returns whether the vertex is on boundary Generated from method MR::Mesh::sumAngles.

Calls MR_Mesh_sumAngles().

◆ to_edge_point_1()

auto meshlib::Mesh::to_edge_point_1 ( v:meshlib::VertId ) const -> meshlib::Owned< meshlib::EdgePoint >

converts vertex into edge-point representation Generated from method MR::Mesh::toEdgePoint.

Calls MR_Mesh_toEdgePoint_1().

◆ to_edge_point_2()

auto meshlib::Mesh::to_edge_point_2 ( e:meshlib::EdgeId ,
p:&meshlib::Vector3f  ) const -> meshlib::Owned< meshlib::EdgePoint >

converts edge and 3d point into edge-point representation Generated from method MR::Mesh::toEdgePoint.

Calls MR_Mesh_toEdgePoint_2().

◆ to_tri_point_1_mr_point_on_face()

auto meshlib::Mesh::to_tri_point_1_mr_point_on_face ( p:&meshlib::PointOnFace ) const -> meshlib::Owned< meshlib::MeshTriPoint >

converts face id and 3d point into barycentric representation Generated from method MR::Mesh::toTriPoint.

Calls MR_Mesh_toTriPoint_1_MR_PointOnFace().

◆ to_tri_point_1_mr_vert_id()

auto meshlib::Mesh::to_tri_point_1_mr_vert_id ( v:meshlib::VertId ) const -> meshlib::Owned< meshlib::MeshTriPoint >

converts vertex into barycentric representation Generated from method MR::Mesh::toTriPoint.

Calls MR_Mesh_toTriPoint_1_MR_VertId().

◆ to_tri_point_2()

auto meshlib::Mesh::to_tri_point_2 ( f:meshlib::FaceId ,
p:&meshlib::Vector3f  ) const -> meshlib::Owned< meshlib::MeshTriPoint >

converts face id and 3d point into barycentric representation Generated from method MR::Mesh::toTriPoint.

Calls MR_Mesh_toTriPoint_2().

◆ topology()

auto meshlib::Mesh::topology ( ) const -> &meshlib::MeshTopology

Returns a pointer to a member variable of class MR::Mesh named topology.

Calls MR_Mesh_Get_topology(). The reference to this object might be preserved as the return value.

◆ topology_mut()

auto meshlib::Mesh::topology_mut ( ) -> &mut meshlib::MeshTopology

Returns a mutable pointer to a member variable of class MR::Mesh named topology.

Calls MR_Mesh_GetMutable_topology(). The reference to this object might be preserved as the return value.

◆ transform()

void meshlib::Mesh::transform ( xf:&meshlib::AffineXf3f ,
region:Option<&meshlib::VertBitSet >  )

applies given transformation to specified vertices if region is nullptr, all valid mesh vertices are used

Generated from method MR::Mesh::transform.

Calls MR_Mesh_transform().

◆ tri_center()

auto meshlib::Mesh::tri_center ( f:meshlib::FaceId ) const -> meshlib::Vector3f

returns the centroid of given triangle Generated from method MR::Mesh::triCenter.

Calls MR_Mesh_triCenter().

◆ tri_point()

auto meshlib::Mesh::tri_point ( p:&meshlib::MeshTriPoint ) const -> meshlib::Vector3f

computes coordinates of point given as face and barycentric representation Generated from method MR::Mesh::triPoint.

Calls MR_Mesh_triPoint().

◆ triangle_aspect_ratio()

auto meshlib::Mesh::triangle_aspect_ratio ( f:meshlib::FaceId ) const -> f32

returns aspect ratio of given mesh triangle equal to the ratio of the circum-radius to twice its in-radius Generated from method MR::Mesh::triangleAspectRatio.

Calls MR_Mesh_triangleAspectRatio().

◆ update_caches()

void meshlib::Mesh::update_caches ( changedVerts:Option<&meshlib::VertBitSet > )

updates existing caches in case of few vertices were changed insignificantly, and topology remained unchanged; it shall be considered as a faster alternative to invalidateCaches() and following rebuild of trees

Parameters
changedVertsvertices with modified coordinates, nullptr means all valid vertices Generated from method MR::Mesh::updateCaches.

Calls MR_Mesh_updateCaches().

◆ update_caches_after_splits()

updates existing caches after some faces were split into parts (e.g. by splitFace() or splitEdge()) with no other changes in the mesh; it shall be considered as a faster alternative to invalidateCaches() and following rebuild of AABB tree

Parameters
new2Oldmaps every face appeared after the splits to the face it was split from (as filled by splitFace() and splitEdge()); it must contain only the splits made since the AABB tree was built or last updated: a map accumulated over several updates would add the earlier faces to the tree once more Generated from method MR::Mesh::updateCachesAfterSplits.

Calls MR_Mesh_updateCachesAfterSplits().

◆ volume()

auto meshlib::Mesh::volume ( region:Option<&meshlib::FaceBitSet > ) const -> f64

returns volume of the object surrounded by given region (or whole mesh if (region) is nullptr); if the region has holes then each hole will be virtually filled by adding triangles for each edge and the hole's geometrical center Generated from method MR::Mesh::volume.

Calls MR_Mesh_volume().

◆ zero_unused_points()

void meshlib::Mesh::zero_unused_points ( )

for all points not in topology.getValidVerts() sets coordinates to (0,0,0) Generated from method MR::Mesh::zeroUnusedPoints.

Calls MR_Mesh_zeroUnusedPoints().


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