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>.
| 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().
| 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().
| 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
| flipOrientation | true means that every (from) triangle is inverted before adding optional |
| vacant | can be passed to copy elements not at the end, but over given ones, which the user guaranties to be free/lone |
Calls MR_Mesh_addMeshPart().
| 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
| vacant | can 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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.
| 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().
| 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().
| 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
| beta | determines the precision of fast approximation: the more the better, recommended value 2 or more Generated from method MR::Mesh::calcFastWindingNumber. |
| 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().
| 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().
| 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().
| 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().
| 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().
|
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.
| 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().
| 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().
| 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().
| 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
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
|
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().
|
static |
construct mesh from point triples;
| 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().
|
static |
construct mesh from TriMesh representation Generated from method MR::Mesh::fromTriMesh.
Calls MR_Mesh_fromTriMesh().
|
static |
construct mesh from vertex coordinates and a set of triangles with given ids Generated from method MR::Mesh::fromTriangles.
Calls MR_Mesh_fromTriangles().
|
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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| auto meshlib::Mesh::get_plane3d | ( | f:meshlib::FaceId | ) | const -> meshlib::Owned< meshlib::Plane3d > |
Generated from method MR::Mesh::getPlane3d.
Calls MR_Mesh_getPlane3d().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| void meshlib::Mesh::invalidate_caches | ( | pointsChanged:Option< bool > | ) |
invalidates caches (aabb-trees) after any change in mesh geometry or topology
| pointsChanged | specifies whether points have changed (otherwise only topology has changed) Generated from method MR::Mesh::invalidateCaches. |
Calls MR_Mesh_invalidateCaches().
| 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
| beta | determines 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| void meshlib::Mesh::mirror | ( | plane:&meshlib::Plane3f | ) |
reflects the mesh from a given plane Generated from method MR::Mesh::mirror.
Calls MR_Mesh_mirror().
|
static |
Constructs an empty (default-constructed) instance.
Calls MR_Mesh_DefaultConstruct().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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
| preserveAABBTree | whether 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().
| 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().
| 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.
| 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.
| 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().
| 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;
| point | source location to look the closest to |
| maxDistSq | search only in the ball with sqrt(maxDistSq) radius around given point, smaller value here increases performance |
| xf | is mesh-to-point transformation, if not specified then identity transformation is assumed and works much faster; |
Calls MR_Mesh_projectPoint_4().
| 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;
| point | source location to look the closest to |
| res | found closest point including Euclidean coordinates, barycentric coordinates, FaceId and squared distance to point |
| maxDistSq | search only in the ball with sqrt(maxDistSq) radius around given point, smaller value here increases performance |
| xf | is mesh-to-point transformation, if not specified then identity transformation is assumed and works much faster; |
Calls MR_Mesh_projectPoint_5_MR_MeshProjectionResult().
| 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;
| point | source location to look the closest to |
| res | found closest point including Euclidean coordinates and FaceId |
| maxDistSq | search only in the ball with sqrt(maxDistSq) radius around given point, smaller value here increases performance |
| xf | is mesh-to-point transformation, if not specified then identity transformation is assumed and works much faster; |
Calls MR_Mesh_projectPoint_5_MR_PointOnFace().
| 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().
| 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().
| 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().
| 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().
| 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.
| 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.
| void meshlib::Mesh::shrink_to_fit | ( | ) |
requests the removal of unused capacity Generated from method MR::Mesh::shrinkToFit.
Calls MR_Mesh_shrinkToFit().
| auto meshlib::Mesh::signed_distance_1 | ( | pt:&meshlib::Vector3f | ) | const -> f32 |
given a point (pt) in 3D, computes the closest point on mesh, and
Calls MR_Mesh_signedDistance_1().
| 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
Calls MR_Mesh_signedDistance_3_float().
| 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),
Calls MR_Mesh_signedDistance_3_MR_MeshProjectionResult().
| auto meshlib::Mesh::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 |
same, but split given edge on two equal parts Generated from method MR::Mesh::splitEdge.
Calls MR_Mesh_splitEdge_3().
| auto meshlib::Mesh::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 |
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
| new2Old | receive mapping from newly appeared triangle to its original triangle (part to full) Generated from method MR::Mesh::splitEdge. |
Calls MR_Mesh_splitEdge_4().
| auto meshlib::Mesh::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 |
same, putting new vertex in the centroid of original triangle Generated from method MR::Mesh::splitFace.
Calls MR_Mesh_splitFace_3().
| auto meshlib::Mesh::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 |
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
| new2Old | receive mapping from newly appeared triangle to its original triangle (part to full) Generated from method MR::Mesh::splitFace. |
Calls MR_Mesh_splitFace_4().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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.
| 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.
| 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().
| 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().
| 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().
| 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().
| 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
| changedVerts | vertices with modified coordinates, nullptr means all valid vertices Generated from method MR::Mesh::updateCaches. |
Calls MR_Mesh_updateCaches().
| void meshlib::Mesh::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 | ) |
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
| new2Old | maps 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().
| 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().
| 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().