Additional Inherited Members | |
| Protected Member Functions inherited from meshlib.CppObject | |
| CppObject (java.lang.foreign.MemorySegment ptr, java.util.function.Consumer< java.lang.foreign.MemorySegment > destroy, java.lang.Object owner) | |
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.
Instances created here own their C++ objects, see CppObject.
| meshlib.Mesh.Mesh | ( | java.lang.foreign.MemorySegment | ptr, |
| boolean | owned, | ||
| java.lang.Object | owner ) |
Wraps a pointer from the C bindings. If owned, the object is destroyed when the wrapper dies. owner is kept alive as long as this wrapper is. Not for normal use.
| meshlib.Mesh.Mesh | ( | ) |
Constructs an empty (default-constructed) instance.
Calls MR_Mesh_DefaultConstruct().
| meshlib.Mesh.Mesh | ( | meshlib.Mesh | _other | ) |
Generated from constructor MR::Mesh::Mesh. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.
Calls MR_Mesh_ConstructFromAnother().
| void meshlib.Mesh.addMesh | ( | meshlib.Mesh | from, |
| meshlib.FaceMap | outFmap, | ||
| meshlib.VertMap | outVmap, | ||
| meshlib.WholeEdgeMap | outEmap, | ||
| java.lang.Boolean | rearrangeTriangles ) |
Generated from method MR::Mesh::addMesh.
Calls MR_Mesh_addMesh_outMaps().
| void meshlib.Mesh.addMesh | ( | meshlib.Mesh | from, |
| meshlib.PartMapping | map, | ||
| java.lang.Boolean | rearrangeTriangles ) |
appends another mesh as separate connected component(s) to this Generated from method MR::Mesh::addMesh.
Calls MR_Mesh_addMesh().
| boolean meshlib.Mesh.addMeshPart | ( | meshlib.MeshPart | from, |
| java.lang.Boolean | flipOrientation, | ||
| meshlib.std_vector_std_vector_MR_EdgeId | thisContours, | ||
| meshlib.std_vector_std_vector_MR_EdgeId | fromContours, | ||
| meshlib.PartMapping | map, | ||
| meshlib.VacantElements | vacant ) |
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.addMeshPart | ( | meshlib.MeshPart | from, |
| meshlib.PartMapping | map, | ||
| meshlib.VacantElements | vacant ) |
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().
| meshlib.VertId meshlib.Mesh.addPoint | ( | meshlib.Vector3f | pos | ) |
creates new point and assigns given position to it Generated from method MR::Mesh::addPoint.
Calls MR_Mesh_addPoint().
| meshlib.EdgeId meshlib.Mesh.addSeparateContours | ( | meshlib.std_vector_std_vector_MR_Vector3f | contours, |
| meshlib.AffineXf3f | xf ) |
append points to mesh and connect them returns first EdgeId of new edges Generated from method MR::Mesh::addSeparateContours.
Calls MR_Mesh_addSeparateContours().
| meshlib.EdgeId meshlib.Mesh.addSeparateEdgeLoop | ( | meshlib.std_vector_MR_Vector3f | contourPoints | ) |
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().
| double meshlib.Mesh.area | ( | meshlib.FaceBitSet | fs | ) |
computes the area of given face-region (or whole mesh) Generated from method MR::Mesh::area.
Calls MR_Mesh_area_const_MR_FaceBitSet_ptr().
| float meshlib.Mesh.area | ( | meshlib.FaceId | f | ) |
returns the area of given face Generated from method MR::Mesh::area.
Calls MR_Mesh_area_MR_FaceId().
| meshlib.Mesh meshlib.Mesh.assignFromAnother | ( | meshlib.Mesh | _other | ) |
Generated from method MR::Mesh::operator=. The reference to things referred to by the parameter _other (if any) might be preserved in this object.
Calls MR_Mesh_AssignFromAnother().
| void meshlib.Mesh.attachEdgeLoopPart | ( | meshlib.EdgeId | first, |
| meshlib.EdgeId | last, | ||
| meshlib.std_vector_MR_Vector3f | contourPoints ) |
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().
| float meshlib.Mesh.averageEdgeLength | ( | ) |
computes average length of an edge in this mesh Generated from method MR::Mesh::averageEdgeLength.
Calls MR_Mesh_averageEdgeLength().
| float meshlib.Mesh.calcFastWindingNumber | ( | meshlib.Vector3f | pt, |
| java.lang.Float | beta ) |
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. |
| float meshlib.Mesh.circumcircleDiameter | ( | meshlib.FaceId | f | ) |
returns circumcircle diameter of given mesh triangle Generated from method MR::Mesh::circumcircleDiameter.
Calls MR_Mesh_circumcircleDiameter().
| float meshlib.Mesh.circumcircleDiameterSq | ( | meshlib.FaceId | f | ) |
returns squared circumcircle diameter of given mesh triangle Generated from method MR::Mesh::circumcircleDiameterSq.
Calls MR_Mesh_circumcircleDiameterSq().
| meshlib.Mesh meshlib.Mesh.cloneRegion | ( | meshlib.FaceBitSet | region, |
| java.lang.Boolean | flipOrientation, | ||
| meshlib.PartMapping | map ) |
creates new mesh from given triangles of this mesh Generated from method MR::Mesh::cloneRegion.
Calls MR_Mesh_cloneRegion().
| meshlib.Box3f meshlib.Mesh.computeBoundingBox | ( | meshlib.AffineXf3f | toWorld | ) |
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().
| meshlib.Box3f meshlib.Mesh.computeBoundingBox | ( | meshlib.FaceBitSet | region, |
| meshlib.AffineXf3f | toWorld ) |
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().
| float meshlib.Mesh.cotan | ( | meshlib.UndirectedEdgeId | ue | ) |
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().
| float meshlib.Mesh.dblArea | ( | meshlib.FaceId | f | ) |
returns twice the area of given face Generated from method MR::Mesh::dblArea.
Calls MR_Mesh_dblArea_MR_FaceId().
| float meshlib.Mesh.dblArea | ( | meshlib.VertId | v | ) |
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.deleteFaces | ( | meshlib.FaceBitSet | fs, |
| meshlib.UndirectedEdgeBitSet | keepEdges ) |
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().
| meshlib.VacantElements meshlib.Mesh.deleteFacesFindVacant | ( | meshlib.FaceBitSet | fs, |
| meshlib.UndirectedEdgeBitSet | keepEdges ) |
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().
| meshlib.Vector3f meshlib.Mesh.destPnt | ( | meshlib.EdgeId | e | ) |
returns coordinates of the edge destination Generated from method MR::Mesh::destPnt.
Calls MR_Mesh_destPnt().
| float meshlib.Mesh.dihedralAngle | ( | meshlib.UndirectedEdgeId | e | ) |
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().
| float meshlib.Mesh.dihedralAngleCos | ( | meshlib.UndirectedEdgeId | e | ) |
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().
| float meshlib.Mesh.dihedralAngleSin | ( | meshlib.UndirectedEdgeId | e | ) |
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().
| meshlib.Vector3d meshlib.Mesh.dirArea | ( | meshlib.FaceBitSet | fs | ) |
computes the sum of directed areas for faces from given region (or whole mesh) Generated from method MR::Mesh::dirArea.
Calls MR_Mesh_dirArea().
| meshlib.Vector3f meshlib.Mesh.dirDblArea | ( | meshlib.FaceId | f | ) |
computes directed double area for a triangular face from its vertices Generated from method MR::Mesh::dirDblArea.
Calls MR_Mesh_dirDblArea_MR_FaceId().
| meshlib.Vector3f meshlib.Mesh.dirDblArea | ( | meshlib.VertId | v | ) |
computes sum of directed double areas of all triangles around given vertex Generated from method MR::Mesh::dirDblArea.
Calls MR_Mesh_dirDblArea_MR_VertId().
| float meshlib.Mesh.discreteGaussianCurvature | ( | meshlib.VertId | v, |
| meshlib.bool_output | outBoundaryVert ) |
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().
| meshlib.VertScalars meshlib.Mesh.discreteGaussianCurvatures | ( | meshlib.VertBitSet | region | ) |
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().
| float meshlib.Mesh.discreteMeanCurvature | ( | meshlib.UndirectedEdgeId | e | ) |
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().
| float meshlib.Mesh.discreteMeanCurvature | ( | meshlib.VertId | v | ) |
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().
| meshlib.VertScalars meshlib.Mesh.discreteMeanCurvatures | ( | meshlib.VertBitSet | region | ) |
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().
| meshlib.Vector3f meshlib.Mesh.edgeCenter | ( | meshlib.UndirectedEdgeId | e | ) |
computes the center of given edge Generated from method MR::Mesh::edgeCenter.
Calls MR_Mesh_edgeCenter().
| float meshlib.Mesh.edgeLength | ( | meshlib.UndirectedEdgeId | e | ) |
returns Euclidean length of the edge Generated from method MR::Mesh::edgeLength.
Calls MR_Mesh_edgeLength().
| meshlib.UndirectedEdgeScalars meshlib.Mesh.edgeLengths | ( | ) |
computes and returns the lengths of all edges in the mesh Generated from method MR::Mesh::edgeLengths.
Calls MR_Mesh_edgeLengths().
| float meshlib.Mesh.edgeLengthSq | ( | meshlib.UndirectedEdgeId | e | ) |
returns squared Euclidean length of the edge (faster to compute than length) Generated from method MR::Mesh::edgeLengthSq.
Calls MR_Mesh_edgeLengthSq().
| meshlib.Vector3f meshlib.Mesh.edgePoint | ( | meshlib.EdgeId | e, |
| float | f ) |
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().
| meshlib.Vector3f meshlib.Mesh.edgePoint | ( | meshlib.EdgePoint | ep | ) |
computes coordinates of point given as edge and relative position on it Generated from method MR::Mesh::edgePoint.
Calls MR_Mesh_edgePoint_1().
| meshlib.LineSegm3f meshlib.Mesh.edgeSegment | ( | meshlib.EdgeId | e | ) |
returns line segment of given edge Generated from method MR::Mesh::edgeSegment.
Calls MR_Mesh_edgeSegment().
| meshlib.Vector3f meshlib.Mesh.edgeVector | ( | meshlib.EdgeId | e | ) |
returns vector equal to edge destination point minus edge origin point Generated from method MR::Mesh::edgeVector.
Calls MR_Mesh_edgeVector().
| meshlib.Vector3f meshlib.Mesh.findCenterFromBBox | ( | ) |
computes bounding box and returns its center Generated from method MR::Mesh::findCenterFromBBox.
Calls MR_Mesh_findCenterFromBBox().
| meshlib.Vector3f meshlib.Mesh.findCenterFromFaces | ( | ) |
computes center of mass considering that density of all triangles is the same Generated from method MR::Mesh::findCenterFromFaces.
Calls MR_Mesh_findCenterFromFaces().
| meshlib.Vector3f meshlib.Mesh.findCenterFromPoints | ( | ) |
computes average position of all valid mesh vertices Generated from method MR::Mesh::findCenterFromPoints.
Calls MR_Mesh_findCenterFromPoints().
| meshlib.MeshProjectionResult meshlib.Mesh.findClosestPoint | ( | meshlib.Vector3f | point, |
| java.lang.Float | maxDistSq, | ||
| meshlib.FaceBitSet | region, | ||
| meshlib.AffineXf3f | xf ) |
Generated from method MR::Mesh::findClosestPoint.
Calls MR_Mesh_findClosestPoint_4().
| boolean meshlib.Mesh.findClosestPoint | ( | meshlib.Vector3f | point, |
| meshlib.MeshProjectionResult | res, | ||
| java.lang.Float | maxDistSq, | ||
| meshlib.FaceBitSet | region, | ||
| meshlib.AffineXf3f | xf ) |
Generated from method MR::Mesh::findClosestPoint.
Calls MR_Mesh_findClosestPoint_5().
| meshlib.UndirectedEdgeBitSet meshlib.Mesh.findCreaseEdges | ( | float | angleFromPlanar | ) |
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().
| meshlib.UndirectedEdgeBitSet meshlib.Mesh.findSharpEdges | ( | float | minSharpCos, |
| float | maxSharpCos ) |
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().
| meshlib.VertBitSet meshlib.Mesh.findSpikeVertices | ( | float | minSumAngle, |
| meshlib.VertBitSet | region, | ||
| meshlib.std_function_bool_from_float | cb ) |
returns vertices where the sum of triangle angles is below given threshold Generated from method MR::Mesh::findSpikeVertices.
Calls MR_Mesh_findSpikeVertices(). The C++ function returns expected<MR::VertBitSet, std::string>: the value is returned and an error is thrown as UnexpectedResultException.
| void meshlib.Mesh.flipOrientation | ( | meshlib.UndirectedEdgeBitSet | fullComponents | ) |
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 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().
|
static |
construct mesh from TriMesh representation Generated from method MR::Mesh::fromTriMesh.
Calls MR_Mesh_fromTriMesh().
| meshlib.AABBTree meshlib.Mesh.getAABBTree | ( | ) |
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().
| meshlib.AABBTree meshlib.Mesh.getAABBTreeNotCreate | ( | ) |
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().
| meshlib.AABBTreePoints meshlib.Mesh.getAABBTreePoints | ( | ) |
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().
| meshlib.AABBTreePoints meshlib.Mesh.getAABBTreePointsNotCreate | ( | ) |
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().
| meshlib.Box3f meshlib.Mesh.getBoundingBox | ( | ) |
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().
| meshlib.UndirectedEdgeId meshlib.Mesh.getClosestEdge | ( | meshlib.MeshTriPoint | p | ) |
returns one of three face edges, closest to given point Generated from method MR::Mesh::getClosestEdge.
Calls MR_Mesh_getClosestEdge_MR_MeshTriPoint().
| meshlib.UndirectedEdgeId meshlib.Mesh.getClosestEdge | ( | meshlib.PointOnFace | p | ) |
returns one of three face edges, closest to given point Generated from method MR::Mesh::getClosestEdge.
Calls MR_Mesh_getClosestEdge_MR_PointOnFace().
| meshlib.VertId meshlib.Mesh.getClosestVertex | ( | meshlib.MeshTriPoint | p | ) |
returns one of three face vertices, closest to given point Generated from method MR::Mesh::getClosestVertex.
Calls MR_Mesh_getClosestVertex_MR_MeshTriPoint().
| meshlib.VertId meshlib.Mesh.getClosestVertex | ( | meshlib.PointOnFace | p | ) |
returns one of three face vertices, closest to given point Generated from method MR::Mesh::getClosestVertex.
Calls MR_Mesh_getClosestVertex_MR_PointOnFace().
| meshlib.Dipoles meshlib.Mesh.getDipoles | ( | ) |
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().
| meshlib.Dipoles meshlib.Mesh.getDipolesNotCreate | ( | ) |
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().
| meshlib.std_array_MR_Vector3f_3 meshlib.Mesh.getLeftTriPoints | ( | meshlib.EdgeId | e | ) |
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.getLeftTriPoints | ( | meshlib.EdgeId | e, |
| meshlib.Vector3f | v0, | ||
| meshlib.Vector3f | v1, | ||
| meshlib.Vector3f | v2 ) |
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().
| meshlib.Plane3d meshlib.Mesh.getPlane3d | ( | meshlib.FaceId | f | ) |
Generated from method MR::Mesh::getPlane3d.
Calls MR_Mesh_getPlane3d().
| meshlib.Plane3f meshlib.Mesh.getPlane3f | ( | meshlib.FaceId | f | ) |
returns the plane containing given triangular face with normal looking outwards Generated from method MR::Mesh::getPlane3f.
Calls MR_Mesh_getPlane3f().
| meshlib.std_array_MR_Vector3f_3 meshlib.Mesh.getTriPoints | ( | meshlib.FaceId | f | ) |
returns three points of given face Generated from method MR::Mesh::getTriPoints.
Calls MR_Mesh_getTriPoints_1().
| void meshlib.Mesh.getTriPoints | ( | meshlib.FaceId | f, |
| meshlib.Vector3f | v0, | ||
| meshlib.Vector3f | v1, | ||
| meshlib.Vector3f | v2 ) |
returns three points of given face Generated from method MR::Mesh::getTriPoints.
Calls MR_Mesh_getTriPoints_4().
| long meshlib.Mesh.heapBytes | ( | ) |
returns the amount of memory this object occupies on heap Generated from method MR::Mesh::heapBytes.
Calls MR_Mesh_heapBytes().
| meshlib.Vector3d meshlib.Mesh.holeDirArea | ( | meshlib.EdgeId | e | ) |
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().
| double meshlib.Mesh.holePerimeter | ( | meshlib.EdgeId | e | ) |
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.invalidateCaches | ( | java.lang.Boolean | pointsChanged | ) |
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().
| boolean meshlib.Mesh.isOutside | ( | meshlib.Vector3f | pt, |
| java.lang.Float | windingNumberThreshold, | ||
| java.lang.Float | beta ) |
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().
| boolean meshlib.Mesh.isOutsideByProjNorm | ( | meshlib.Vector3f | pt, |
| meshlib.MeshProjectionResult | proj, | ||
| meshlib.FaceBitSet | region ) |
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().
| float meshlib.Mesh.leftCotan | ( | meshlib.EdgeId | e | ) |
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().
| meshlib.Vector3f meshlib.Mesh.leftDirDblArea | ( | meshlib.EdgeId | e | ) |
computes directed double area of left triangular face of given edge Generated from method MR::Mesh::leftDirDblArea.
Calls MR_Mesh_leftDirDblArea().
| meshlib.Vector3f meshlib.Mesh.leftNormal | ( | meshlib.EdgeId | e | ) |
computes triangular face normal from its vertices Generated from method MR::Mesh::leftNormal.
Calls MR_Mesh_leftNormal().
| meshlib.Vector3f meshlib.Mesh.leftTangent | ( | meshlib.EdgeId | e | ) |
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 | ( | meshlib.Plane3f | plane | ) |
reflects the mesh from a given plane Generated from method MR::Mesh::mirror.
Calls MR_Mesh_mirror().
| meshlib.Vector3f meshlib.Mesh.normal | ( | meshlib.FaceId | f | ) |
computes triangular face normal from its vertices Generated from method MR::Mesh::normal.
Calls MR_Mesh_normal_MR_FaceId().
| meshlib.Vector3f meshlib.Mesh.normal | ( | meshlib.MeshTriPoint | p | ) |
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().
| meshlib.Vector3f meshlib.Mesh.normal | ( | meshlib.VertId | v | ) |
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().
| boolean meshlib.Mesh.opEqual | ( | meshlib.Mesh | b | ) |
compare that two meshes are exactly the same Generated from method MR::Mesh::operator==.
Calls MR_equal_MR_Mesh().
| boolean meshlib.Mesh.opNotEqual | ( | meshlib.Mesh | b | ) |
compare that two meshes are exactly the same Generated from method MR::Mesh::operator!=.
Calls MR_not_equal_MR_Mesh().
| meshlib.Vector3f meshlib.Mesh.orgPnt | ( | meshlib.EdgeId | e | ) |
returns coordinates of the edge origin Generated from method MR::Mesh::orgPnt.
Calls MR_Mesh_orgPnt().
| void meshlib.Mesh.pack | ( | meshlib.FaceMap | outFmap, |
| meshlib.VertMap | outVmap, | ||
| meshlib.WholeEdgeMap | outEmap, | ||
| java.lang.Boolean | rearrangeTriangles ) |
Generated from method MR::Mesh::pack.
Calls MR_Mesh_pack_4().
| void meshlib.Mesh.pack | ( | meshlib.PackMapping | map, |
| meshlib.std_function_bool_from_float | cb ) |
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(). The C++ function returns expected<void, std::string>: the value is returned and an error is thrown as UnexpectedResultException.
| void meshlib.Mesh.pack | ( | meshlib.PartMapping | map, |
| java.lang.Boolean | rearrangeTriangles ) |
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().
| meshlib.PackMapping meshlib.Mesh.packOptimally | ( | boolean | preserveAABBTree, |
| meshlib.std_function_bool_from_float | cb ) |
Generated from method MR::Mesh::packOptimally.
Calls MR_Mesh_packOptimally_2(). The C++ function returns expected<MR::PackMapping, std::string>: the value is returned and an error is thrown as UnexpectedResultException.
| meshlib.PackMapping meshlib.Mesh.packOptimally | ( | java.lang.Boolean | preserveAABBTree | ) |
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().
| meshlib.VertCoords meshlib.Mesh.points | ( | ) |
Returns a pointer to a member variable of class MR::Mesh named points. The reference to this object might be preserved as the return value.
Calls MR_Mesh_Get_points().
| double meshlib.Mesh.projArea | ( | meshlib.Vector3f | dir, |
| meshlib.FaceBitSet | fs ) |
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().
| meshlib.MeshProjectionResult meshlib.Mesh.projectPoint | ( | meshlib.Vector3f | point, |
| java.lang.Float | maxDistSq, | ||
| meshlib.FaceBitSet | region, | ||
| meshlib.AffineXf3f | xf ) |
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().
| boolean meshlib.Mesh.projectPoint | ( | meshlib.Vector3f | point, |
| meshlib.MeshProjectionResult | res, | ||
| java.lang.Float | maxDistSq, | ||
| meshlib.FaceBitSet | region, | ||
| meshlib.AffineXf3f | xf ) |
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().
| boolean meshlib.Mesh.projectPoint | ( | meshlib.Vector3f | point, |
| meshlib.PointOnFace | res, | ||
| java.lang.Float | maxDistSq, | ||
| meshlib.FaceBitSet | region, | ||
| meshlib.AffineXf3f | xf ) |
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().
| meshlib.Vector3f meshlib.Mesh.pseudonormal | ( | meshlib.MeshTriPoint | p, |
| meshlib.FaceBitSet | region ) |
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().
| meshlib.Vector3f meshlib.Mesh.pseudonormal | ( | meshlib.UndirectedEdgeId | e, |
| meshlib.FaceBitSet | region ) |
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().
| meshlib.Vector3f meshlib.Mesh.pseudonormal | ( | meshlib.VertId | v, |
| meshlib.FaceBitSet | region ) |
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().
| meshlib.QuadraticForm3f meshlib.Mesh.quadraticForm | ( | meshlib.VertId | v, |
| boolean | angleWeigted, | ||
| meshlib.FaceBitSet | region, | ||
| meshlib.UndirectedEdgeBitSet | creases ) |
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.setPoints | ( | meshlib.VertCoords | value | ) |
Modifies a member variable of class MR::Mesh named points. The reference to the parameter value might be preserved in this object in element points.
Calls MR_Mesh_Set_points().
| void meshlib.Mesh.setTopology | ( | meshlib.MeshTopology | value | ) |
Modifies a member variable of class MR::Mesh named topology. The reference to the parameter value might be preserved in this object in element topology.
Calls MR_Mesh_Set_topology().
| void meshlib.Mesh.shrinkToFit | ( | ) |
requests the removal of unused capacity Generated from method MR::Mesh::shrinkToFit.
Calls MR_Mesh_shrinkToFit().
| float meshlib.Mesh.signedDistance | ( | meshlib.Vector3f | pt | ) |
given a point (pt) in 3D, computes the closest point on mesh, and
Calls MR_Mesh_signedDistance_1().
| meshlib.std_optional_float meshlib.Mesh.signedDistance | ( | meshlib.Vector3f | pt, |
| float | maxDistSq, | ||
| meshlib.FaceBitSet | region ) |
given a point (pt) in 3D, computes the closest point on mesh, and
Calls MR_Mesh_signedDistance_3_float().
| float meshlib.Mesh.signedDistance | ( | meshlib.Vector3f | pt, |
| meshlib.MeshProjectionResult | proj, | ||
| meshlib.FaceBitSet | region ) |
given a point (pt) in 3D and the closest point to in on mesh (proj),
Calls MR_Mesh_signedDistance_3_MR_MeshProjectionResult().
| meshlib.EdgeId meshlib.Mesh.splitEdge | ( | meshlib.EdgeId | e, |
| meshlib.FaceBitSet | region, | ||
| meshlib.phmap.phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_st__dda91c58 | new2Old ) |
same, but split given edge on two equal parts Generated from method MR::Mesh::splitEdge.
Calls MR_Mesh_splitEdge_3().
| meshlib.EdgeId meshlib.Mesh.splitEdge | ( | meshlib.EdgeId | e, |
| meshlib.Vector3f | newVertPos, | ||
| meshlib.FaceBitSet | region, | ||
| meshlib.phmap.phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_st__dda91c58 | new2Old ) |
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().
| meshlib.VertId meshlib.Mesh.splitFace | ( | meshlib.FaceId | f, |
| meshlib.FaceBitSet | region, | ||
| meshlib.phmap.phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_st__dda91c58 | new2Old ) |
same, putting new vertex in the centroid of original triangle Generated from method MR::Mesh::splitFace.
Calls MR_Mesh_splitFace_3().
| meshlib.VertId meshlib.Mesh.splitFace | ( | meshlib.FaceId | f, |
| meshlib.Vector3f | newVertPos, | ||
| meshlib.FaceBitSet | region, | ||
| meshlib.phmap.phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_st__dda91c58 | new2Old ) |
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().
| float meshlib.Mesh.sumAngles | ( | meshlib.VertId | v, |
| meshlib.bool_output | outBoundaryVert ) |
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().
| meshlib.EdgePoint meshlib.Mesh.toEdgePoint | ( | meshlib.EdgeId | e, |
| meshlib.Vector3f | p ) |
converts edge and 3d point into edge-point representation Generated from method MR::Mesh::toEdgePoint.
Calls MR_Mesh_toEdgePoint_2().
| meshlib.EdgePoint meshlib.Mesh.toEdgePoint | ( | meshlib.VertId | v | ) |
converts vertex into edge-point representation Generated from method MR::Mesh::toEdgePoint.
Calls MR_Mesh_toEdgePoint_1().
| meshlib.MeshTopology meshlib.Mesh.topology | ( | ) |
Returns a pointer to a member variable of class MR::Mesh named topology. The reference to this object might be preserved as the return value.
Calls MR_Mesh_Get_topology().
| meshlib.MeshTriPoint meshlib.Mesh.toTriPoint | ( | meshlib.FaceId | f, |
| meshlib.Vector3f | p ) |
converts face id and 3d point into barycentric representation Generated from method MR::Mesh::toTriPoint.
Calls MR_Mesh_toTriPoint_2().
| meshlib.MeshTriPoint meshlib.Mesh.toTriPoint | ( | meshlib.PointOnFace | p | ) |
converts face id and 3d point into barycentric representation Generated from method MR::Mesh::toTriPoint.
Calls MR_Mesh_toTriPoint_1_MR_PointOnFace().
| meshlib.MeshTriPoint meshlib.Mesh.toTriPoint | ( | meshlib.VertId | v | ) |
converts vertex into barycentric representation Generated from method MR::Mesh::toTriPoint.
Calls MR_Mesh_toTriPoint_1_MR_VertId().
| void meshlib.Mesh.transform | ( | meshlib.AffineXf3f | xf, |
| meshlib.VertBitSet | region ) |
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().
| float meshlib.Mesh.triangleAspectRatio | ( | meshlib.FaceId | f | ) |
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().
| meshlib.Vector3f meshlib.Mesh.triCenter | ( | meshlib.FaceId | f | ) |
returns the centroid of given triangle Generated from method MR::Mesh::triCenter.
Calls MR_Mesh_triCenter().
| meshlib.Vector3f meshlib.Mesh.triPoint | ( | meshlib.MeshTriPoint | p | ) |
computes coordinates of point given as face and barycentric representation Generated from method MR::Mesh::triPoint.
Calls MR_Mesh_triPoint().
| void meshlib.Mesh.updateCaches | ( | meshlib.VertBitSet | changedVerts | ) |
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.updateCachesAfterSplits | ( | meshlib.phmap.phmap_flat_hash_map_MR_FaceId_MR_FaceId_phmap_Hash_MR_FaceId_phmap_EqualTo_MR_FaceId_MR_Allocator_st__dda91c58 | new2Old | ) |
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().
| double meshlib.Mesh.volume | ( | meshlib.FaceBitSet | region | ) |
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.zeroUnusedPoints | ( | ) |
for all points not in topology.getValidVerts() sets coordinates to (0,0,0) Generated from method MR::Mesh::zeroUnusedPoints.
Calls MR_Mesh_zeroUnusedPoints().