3#include "MRPch/MRBindingMacros.h"
29 VertCoords vertexCoordinates,
40 VertCoords vertexCoordinates,
42 std::vector<MeshBuilder::VertDuplication> * dups =
nullptr,
49 VertCoords vertexCoordinates,
251 [[nodiscard]]
MRMESH_API std::optional<float>
signedDistance(
const Vector3f & pt,
float maxDistSq,
const FaceBitSet * region =
nullptr )
const;
262 [[nodiscard]]
bool isOutside(
const Vector3f & pt,
float windingNumberThreshold = 0.5f,
float beta = 2 )
const {
return calcFastWindingNumber( pt, beta ) <= windingNumberThreshold; }
322 const FaceBitSet * region =
nullptr,
const UndirectedEdgeBitSet * creases =
nullptr )
const;
396 FaceMap * outFmap, VertMap * outVmap =
nullptr, WholeEdgeMap * outEmap =
nullptr,
bool rearrangeTriangles =
false );
397 [[deprecated]]
MR_BIND_IGNORE void addPart(
const Mesh & from, FaceMap * outFmap =
nullptr, VertMap * outVmap =
nullptr, WholeEdgeMap * outEmap =
nullptr,
bool rearrangeTriangles =
false )
398 {
addMesh( from, outFmap, outVmap, outEmap, rearrangeTriangles ); }
407 const std::vector<EdgePath> & thisContours = {},
408 const std::vector<EdgePath> & fromContours = {},
410 PartMapping map = {} );
412 const std::vector<EdgePath> & thisContours = {},
const std::vector<EdgePath> & fromContours = {},
const PartMapping & map = {} )
413 { addMeshPart( { from, &fromFaces }, flipOrientation, thisContours, fromContours, map ); }
421 FaceMap * outFmap, VertMap * outVmap =
nullptr, WholeEdgeMap * outEmap =
nullptr,
bool rearrangeTriangles =
false );
441 [[nodiscard]]
MRMESH_API bool projectPoint(
const Vector3f& point,
PointOnFace& res,
float maxDistSq = FLT_MAX,
const FaceBitSet* region =
nullptr,
const AffineXf3f * xf =
nullptr )
const;
450 [[nodiscard]]
bool findClosestPoint(
const Vector3f& point,
MeshProjectionResult& res,
float maxDistSq = FLT_MAX,
const FaceBitSet* region =
nullptr,
const AffineXf3f * xf =
nullptr )
const {
return projectPoint( point, res, maxDistSq, region, xf ); }
constexpr bool operator==(ImVec2 a, ImVec2 b)
Definition MRImGuiVectorOperators.h:117
#define MRMESH_API
Definition MRMeshFwd.h:80
bounding volume hierarchy for point cloud structure
Definition MRAABBTreePoints.h:16
Definition MRAABBTree.h:16
Definition MRMeshTopology.h:23
Definition MRSharedThreadSafeOwner.h:19
std::vector<T>-like container that requires specific indexing type,
Definition MRVector.h:23
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:753
float discreteGaussianCurvature(const MeshTopology &topology, const VertCoords &points, VertId v, bool *outBoundaryVert=nullptr)
Definition MRMeshMath.h:301
float area(const MeshTopology &topology, const VertCoords &points, FaceId f)
returns the area of given face
Definition MRMeshMath.h:168
double volume(const MeshTopology &topology, const VertCoords &points, const FaceBitSet *region=nullptr)
float sumAngles(const MeshTopology &topology, const VertCoords &points, VertId v, bool *outBoundaryVert=nullptr)
computes the sum of triangle angles at given vertex; optionally returns whether the vertex is on boun...
double holePerimeter(const MeshTopology &topology, const VertCoords &points, EdgeId e)
computes the perimeter of the hole specified by one of its edges with no valid left face (left is hol...
VertId getClosestVertex(const MeshTopology &topology, const VertCoords &points, const PointOnFace &p)
returns one of three face vertices, closest to given point
Vector3f leftDirDblArea(const MeshTopology &topology, const VertCoords &points, EdgeId e)
computes directed double area of left triangular face of given edge
Vector3f findCenterFromFaces(const MeshTopology &topology, const VertCoords &points)
computes center of mass considering that density of all triangles is the same
float dihedralAngleSin(const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId e)
Vector3f edgeVector(const MeshTopology &topology, const VertCoords &points, EdgeId e)
returns vector equal to edge destination point minus edge origin point
Definition MRMeshMath.h:27
UndirectedEdgeBitSet findCreaseEdges(const MeshTopology &topology, const VertCoords &points, float angleFromPlanar)
finds all mesh edges where dihedral angle is distinct from planar PI angle on at least given value
Contours3< float > Contours3f
Definition MRMeshFwd.h:390
void getTriPoints(const MeshTopology &topology, const VertCoords &points, FaceId f, Vector3f &v0, Vector3f &v1, Vector3f &v2)
returns three points of given face
Definition MRMeshMath.h:72
float triangleAspectRatio(const MeshTopology &topology, const VertCoords &points, FaceId f)
returns aspect ratio of given mesh triangle equal to the ratio of the circum-radius to twice its in-r...
Vector3d holeDirArea(const MeshTopology &topology, const VertCoords &points, EdgeId e)
Vector3f destPnt(const MeshTopology &topology, const VertCoords &points, EdgeId e)
returns coordinates of the edge destination
Definition MRMeshMath.h:21
Vector3f dirDblArea(const MeshTopology &topology, const VertCoords &points, FaceId f)
computes directed double area for a triangular face from its vertices
Definition MRMeshMath.h:153
float dihedralAngleCos(const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId e)
Expected< VertBitSet > findSpikeVertices(const MeshTopology &topology, const VertCoords &points, float minSumAngle, const VertBitSet *region=nullptr, const ProgressCallback &cb={})
returns vertices where the sum of triangle angles is below given threshold
Plane3f
Definition MRMeshFwd.h:393
tl::expected< T, E > Expected
Definition MRExpected.h:31
Vector3f findCenterFromPoints(const MeshTopology &topology, const VertCoords &points)
computes average position of all valid mesh vertices
Vector3f triPoint(const MeshTopology &topology, const VertCoords &points, const MeshTriPoint &p)
computes coordinates of point given as face and barycentric representation
Vector3f edgePoint(const MeshTopology &topology, const VertCoords &points, EdgeId e, float f)
returns a point on the edge: origin point for f=0 and destination point for f=1
Definition MRMeshMath.h:36
float edgeLengthSq(const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId e)
returns squared Euclidean length of the edge (faster to compute than length)
Definition MRMeshMath.h:144
Vector3f findCenterFromBBox(const MeshTopology &topology, const VertCoords &points)
computes bounding box and returns its center
EdgePoint MeshEdgePoint
Definition MRMeshFwd.h:480
HashMap< FaceId, FaceId > FaceHashMap
Definition MRMeshFwd.h:610
UndirectedEdgeScalars edgeLengths(const MeshTopology &topology, const VertCoords &points)
computes and returns the lengths of all edges in the mesh
Vector3f triCenter(const MeshTopology &topology, const VertCoords &points, FaceId f)
returns the centroid of given triangle
float circumcircleDiameter(const MeshTopology &topology, const VertCoords &points, FaceId f)
returns circumcircle diameter of given mesh triangle
Vector3f leftTangent(const MeshTopology &topology, const VertCoords &points, EdgeId e)
computes unit vector that is both orthogonal to given edge and to the normal of its left triangle,...
Vector3f orgPnt(const MeshTopology &topology, const VertCoords &points, EdgeId e)
returns coordinates of the edge origin
Definition MRMeshMath.h:15
MR_BIND_IGNORE double projArea(const MeshTopology &topology, const VertCoords &points, const Vector3f &dir, const FaceBitSet &fs)
Vector3f edgeCenter(const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId e)
computes the center of given edge
Definition MRMeshMath.h:48
float discreteMeanCurvature(const MeshTopology &topology, const VertCoords &points, VertId v)
float dblArea(const MeshTopology &topology, const VertCoords &points, FaceId f)
returns twice the area of given face
Definition MRMeshMath.h:162
MeshEdgePoint toEdgePoint(const MeshTopology &topology, const VertCoords &points, EdgeId e, const Vector3f &p)
converts edge and 3d point into edge-point representation
void getLeftTriPoints(const MeshTopology &topology, const VertCoords &points, EdgeId e, Vector3f &v0, Vector3f &v1, Vector3f &v2)
returns three points of left face of e: v0 = orgPnt( e ), v1 = destPnt( e )
Triangle3< float > Triangle3f
Definition MRMeshFwd.h:468
float edgeLength(const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId e)
returns Euclidean length of the edge
Definition MRMeshMath.h:135
std::array< Vector3f, 3 > MR_BIND_IGNORE
Definition MRMeshBuilderTypes.h:13
float leftCotan(const MeshTopology &topology, const VertCoords &points, EdgeId e)
UndirectedEdgeId getClosestEdge(const MeshTopology &topology, const VertCoords &points, const PointOnFace &p)
returns one of three face edges, closest to given point
float circumcircleDiameterSq(const MeshTopology &topology, const VertCoords &points, FaceId f)
returns squared circumcircle diameter of given mesh triangle
Vector3f pseudonormal(const MeshTopology &topology, const VertCoords &points, VertId v, const FaceBitSet *region=nullptr)
float cotan(const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId ue)
Definition MRMeshMath.h:315
MR_BIND_IGNORE Vector3d dirArea(const MeshTopology &topology, const VertCoords &points, const FaceBitSet &fs)
float averageEdgeLength(const MeshTopology &topology, const VertCoords &points)
computes average length of an edge in the mesh given by (topology, points)
Vector3f leftNormal(const MeshTopology &topology, const VertCoords &points, EdgeId e)
computes triangular face normal from its vertices
Definition MRMeshMath.h:218
float dihedralAngle(const MeshTopology &topology, const VertCoords &points, UndirectedEdgeId e)
MeshTriPoint toTriPoint(const MeshTopology &topology, const VertCoords &points, FaceId f, const Vector3f &p)
converts face id and 3d point into barycentric representation
@ normal
Definition MRUnits.h:45
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRMeshBuilderTypes.h:33
Definition MRMeshProject.h:18
Definition MRMeshTriPoint.h:26
bool projectPoint(const Vector3f &point, PointOnFace &res, float maxDistSq=FLT_MAX, const FaceBitSet *region=nullptr, const AffineXf3f *xf=nullptr) const
Vector3d dirArea(const FaceBitSet *fs=nullptr) const
computes the sum of directed areas for faces from given region (or whole mesh)
Definition MRMesh.h:177
Vector3f pseudonormal(VertId v, const FaceBitSet *region=nullptr) const
Definition MRMesh.h:225
float area(FaceId f) const
returns the area of given face
Definition MRMesh.h:163
EdgeId splitEdge(EdgeId e, const Vector3f &newVertPos, FaceBitSet *region=nullptr, FaceHashMap *new2Old=nullptr)
PackMapping packOptimally(bool preserveAABBTree=true)
VertId addPoint(const Vector3f &pos)
creates new point and assigns given position to it
EdgeId addSeparateEdgeLoop(const std::vector< Vector3f > &contourPoints)
float discreteMeanCurvature(VertId v) const
Definition MRMesh.h:296
MR_BIND_IGNORE void getTriPoints(FaceId f, Vector3f(&v)[3]) const
Definition MRMesh.h:97
VertId getClosestVertex(const MeshTriPoint &p) const
returns one of three face vertices, closest to given point
Definition MRMesh.h:136
float circumcircleDiameterSq(FaceId f) const
returns squared circumcircle diameter of given mesh triangle
Definition MRMesh.h:112
float dihedralAngleCos(UndirectedEdgeId e) const
Definition MRMesh.h:285
void shrinkToFit()
requests the removal of unused capacity
Vector3f normal(const MeshTriPoint &p) const
Definition MRMesh.h:221
float signedDistance(const Vector3f &pt, const MeshProjectionResult &proj, const FaceBitSet *region=nullptr) const
float discreteGaussianCurvature(VertId v, bool *outBoundaryVert=nullptr) const
Definition MRMesh.h:305
Vector3f edgeVector(EdgeId e) const
returns vector equal to edge destination point minus edge origin point
Definition MRMesh.h:68
void pack(const PartMapping &map={}, bool rearrangeTriangles=false)
tightly packs all arrays eliminating lone edges and invalid faces, vertices and points
void attachEdgeLoopPart(EdgeId first, EdgeId last, const std::vector< Vector3f > &contourPoints)
double holePerimeter(EdgeId e) const
computes the perimeter of the hole specified by one of its edges with no valid left face (left is hol...
Definition MRMesh.h:191
float dblArea(FaceId f) const
returns twice the area of given face
Definition MRMesh.h:160
UndirectedEdgeBitSet findCreaseEdges(float angleFromPlanar) const
finds all mesh edges where dihedral angle is distinct from planar PI angle on at least given value
Definition MRMesh.h:308
void addMeshPart(const MeshPart &from, const PartMapping &map)
appends whole or part of another mesh as separate connected component(s) to this
MeshTriPoint toTriPoint(VertId v) const
converts vertex into barycentric representation
const Dipoles & getDipoles() const
returns cached dipoles of aabb-tree nodes for this mesh, creating it if it did not exist in a thread-...
VertId getClosestVertex(const PointOnFace &p) const
returns one of three face vertices, closest to given point
Definition MRMesh.h:133
const AABBTree * getAABBTreeNotCreate() const
returns cached aabb-tree for this mesh, but does not create it if it did not exist
Definition MRMesh.h:465
Expected< void > pack(const PackMapping &map, ProgressCallback cb={})
Box3f computeBoundingBox(const FaceBitSet *region, const AffineXf3f *toWorld=nullptr) const
double area(const FaceBitSet *fs=nullptr) const
computes the area of given face-region (or whole mesh)
Definition MRMesh.h:170
float sumAngles(VertId v, bool *outBoundaryVert=nullptr) const
computes the sum of triangle angles at given vertex; optionally returns whether the vertex is on boun...
Definition MRMesh.h:270
void invalidateCaches(bool pointsChanged=true)
MR_BIND_IGNORE float signedDistance(const Vector3f &pt, const MeshTriPoint &proj, const FaceBitSet *region=nullptr) const
void addMesh(const Mesh &from, PartMapping map={}, bool rearrangeTriangles=false)
appends another mesh as separate connected component(s) to this
float edgeLengthSq(UndirectedEdgeId e) const
returns squared Euclidean length of the edge (faster to compute than length)
Definition MRMesh.h:151
float discreteMeanCurvature(UndirectedEdgeId e) const
Definition MRMesh.h:300
Triangle3f getTriPoints(FaceId f) const
returns three points of given face
Definition MRMesh.h:100
EdgeId splitEdge(EdgeId e, FaceBitSet *region=nullptr, FaceHashMap *new2Old=nullptr)
same, but split given edge on two equal parts
Definition MRMesh.h:383
Vector3f edgePoint(EdgeId e, float f) const
returns a point on the edge: origin point for f=0 and destination point for f=1
Definition MRMesh.h:74
void getLeftTriPoints(EdgeId e, Vector3f &v0, Vector3f &v1, Vector3f &v2) const
returns three points of left face of e: v0 = orgPnt( e ), v1 = destPnt( e )
Definition MRMesh.h:83
Vector3d holeDirArea(EdgeId e) const
Definition MRMesh.h:195
MeshProjectionResult findClosestPoint(const Vector3f &point, float maxDistSq=FLT_MAX, const FaceBitSet *region=nullptr, const AffineXf3f *xf=nullptr) const
Definition MRMesh.h:459
MR_BIND_IGNORE Vector3d dirArea(const FaceBitSet &fs) const
Definition MRMesh.h:174
Vector3f orgPnt(EdgeId e) const
returns coordinates of the edge origin
Definition MRMesh.h:62
UndirectedEdgeScalars edgeLengths() const
computes and returns the lengths of all edges in the mesh
Definition MRMesh.h:148
Vector3f destPnt(EdgeId e) const
returns coordinates of the edge destination
Definition MRMesh.h:65
float triangleAspectRatio(FaceId f) const
returns aspect ratio of given mesh triangle equal to the ratio of the circum-radius to twice its in-r...
Definition MRMesh.h:109
bool isOutsideByProjNorm(const Vector3f &pt, const MeshProjectionResult &proj, const FaceBitSet *region=nullptr) const
float dihedralAngleSin(UndirectedEdgeId e) const
Definition MRMesh.h:279
bool findClosestPoint(const Vector3f &point, MeshProjectionResult &res, float maxDistSq=FLT_MAX, const FaceBitSet *region=nullptr, const AffineXf3f *xf=nullptr) const
Definition MRMesh.h:450
void mirror(const Plane3f &plane)
reflects the mesh from a given plane
float signedDistance(const Vector3f &pt) const
void pack(FaceMap *outFmap, VertMap *outVmap=nullptr, WholeEdgeMap *outEmap=nullptr, bool rearrangeTriangles=false)
Triangle3f getLeftTriPoints(EdgeId e) const
returns three points of left face of e: res[0] = orgPnt( e ), res[1] = destPnt( e )
Definition MRMesh.h:90
MeshTriPoint toTriPoint(FaceId f, const Vector3f &p) const
converts face id and 3d point into barycentric representation
Definition MRMesh.h:121
std::optional< float > signedDistance(const Vector3f &pt, float maxDistSq, const FaceBitSet *region=nullptr) const
MeshEdgePoint toEdgePoint(VertId v) const
converts vertex into edge-point representation
float leftCotan(EdgeId e) const
Definition MRMesh.h:312
Plane3f getPlane3f(FaceId f) const
returns the plane containing given triangular face with normal looking outwards
Vector3f leftNormal(EdgeId e) const
computes triangular face normal from its vertices
Definition MRMesh.h:201
bool isOutside(const Vector3f &pt, float windingNumberThreshold=0.5f, float beta=2) const
Definition MRMesh.h:262
LineSegm3f edgeSegment(EdgeId e) const
returns line segment of given edge
Vector3f leftTangent(EdgeId e) const
computes unit vector that is both orthogonal to given edge and to the normal of its left triangle,...
Definition MRMesh.h:198
static Mesh fromTrianglesDuplicatingNonManifoldVertices(VertCoords vertexCoordinates, Triangulation &t, std::vector< MeshBuilder::VertDuplication > *dups=nullptr, const MeshBuilder::BuildSettings &settings={})
const AABBTreePoints * getAABBTreePointsNotCreate() const
returns cached aabb-tree for points of this mesh, but does not create it if it did not exist
Definition MRMesh.h:471
VertId splitFace(FaceId f, FaceBitSet *region=nullptr, FaceHashMap *new2Old=nullptr)
same, putting new vertex in the centroid of original triangle
Definition MRMesh.h:390
MR_BIND_IGNORE double area(const FaceBitSet &fs) const
Definition MRMesh.h:167
Box3f computeBoundingBox(const AffineXf3f *toWorld=nullptr) const
MeshTopology topology
Definition MRMesh.h:24
UndirectedEdgeId getClosestEdge(const MeshTriPoint &p) const
returns one of three face edges, closest to given point
Definition MRMesh.h:142
void transform(const AffineXf3f &xf, const VertBitSet *region=nullptr)
MR_BIND_IGNORE void addPartByMask(const Mesh &from, const FaceBitSet &fromFaces, const PartMapping &map)
Definition MRMesh.h:402
size_t heapBytes() const
returns the amount of memory this object occupies on heap
void updateCaches(const VertBitSet &changedVerts)
Plane3d getPlane3d(FaceId f) const
Vector3f findCenterFromFaces() const
computes center of mass considering that density of all triangles is the same
Definition MRMesh.h:343
Vector3f triCenter(FaceId f) const
returns the centroid of given triangle
Definition MRMesh.h:106
Vector3f triPoint(const MeshTriPoint &p) const
computes coordinates of point given as face and barycentric representation
Definition MRMesh.h:103
VertCoords points
Definition MRMesh.h:25
VertId splitFace(FaceId f, const Vector3f &newVertPos, FaceBitSet *region=nullptr, FaceHashMap *new2Old=nullptr)
const Dipoles * getDipolesNotCreate() const
returns cached dipoles of aabb-tree nodes for this mesh, but does not create it if it did not exist
Definition MRMesh.h:477
QuadraticForm3f quadraticForm(VertId v, bool angleWeigted, const FaceBitSet *region=nullptr, const UndirectedEdgeBitSet *creases=nullptr) const
Vector3f findCenterFromPoints() const
computes average position of all valid mesh vertices
Definition MRMesh.h:340
float calcFastWindingNumber(const Vector3f &pt, float beta=2) const
Box3f getBoundingBox() const
MR_BIND_IGNORE double projArea(const Vector3f &dir, const FaceBitSet &fs) const
Definition MRMesh.h:181
float cotan(UndirectedEdgeId ue) const
Definition MRMesh.h:316
void zeroUnusedPoints()
for all points not in topology.getValidVerts() sets coordinates to (0,0,0)
float dblArea(VertId v) const
computes the length of summed directed double areas of all triangles around given vertex
Definition MRMesh.h:214
float dihedralAngle(UndirectedEdgeId e) const
Definition MRMesh.h:292
float averageEdgeLength() const
computes average length of an edge in this mesh
Definition MRMesh.h:337
Vector3f leftDirDblArea(EdgeId e) const
computes directed double area of left triangular face of given edge
Definition MRMesh.h:154
Vector3f edgePoint(const MeshEdgePoint &ep) const
computes coordinates of point given as edge and relative position on it
Definition MRMesh.h:77
Expected< PackMapping > packOptimally(bool preserveAABBTree, ProgressCallback cb)
void getTriPoints(FaceId f, Vector3f &v0, Vector3f &v1, Vector3f &v2) const
returns three points of given face
Definition MRMesh.h:93
void addMesh(const Mesh &from, FaceMap *outFmap, VertMap *outVmap=nullptr, WholeEdgeMap *outEmap=nullptr, bool rearrangeTriangles=false)
MR_BIND_IGNORE void addPart(const Mesh &from, FaceMap *outFmap=nullptr, VertMap *outVmap=nullptr, WholeEdgeMap *outEmap=nullptr, bool rearrangeTriangles=false)
Definition MRMesh.h:397
MeshProjectionResult projectPoint(const Vector3f &point, float maxDistSq=FLT_MAX, const FaceBitSet *region=nullptr, const AffineXf3f *xf=nullptr) const
EdgeId addSeparateContours(const Contours3f &contours, const AffineXf3f *xf=nullptr)
void addMeshPart(const MeshPart &from, bool flipOrientation=false, const std::vector< EdgePath > &thisContours={}, const std::vector< EdgePath > &fromContours={}, PartMapping map={})
static Mesh fromPointTriples(const std::vector< Triangle3f > &posTriples, bool duplicateNonManifoldVertices)
Vector3f findCenterFromBBox() const
computes bounding box and returns its center
Definition MRMesh.h:346
Vector3f pseudonormal(const MeshTriPoint &p, const FaceBitSet *region=nullptr) const
Definition MRMesh.h:234
Mesh cloneRegion(const FaceBitSet ®ion, bool flipOrientation=false, const PartMapping &map={}) const
creates new mesh from given triangles of this mesh
bool projectPoint(const Vector3f &point, MeshProjectionResult &res, float maxDistSq=FLT_MAX, const FaceBitSet *region=nullptr, const AffineXf3f *xf=nullptr) const
Vector3f normal(FaceId f) const
computes triangular face normal from its vertices
Definition MRMesh.h:204
float circumcircleDiameter(FaceId f) const
returns circumcircle diameter of given mesh triangle
Definition MRMesh.h:115
Vector3f pseudonormal(UndirectedEdgeId e, const FaceBitSet *region=nullptr) const
computes normalized half sum of face normals sharing given edge (only (region) faces will be consider...
Definition MRMesh.h:228
const AABBTree & getAABBTree() const
returns cached aabb-tree for this mesh, creating it if it did not exist in a thread-safe manner
Vector3f edgeCenter(UndirectedEdgeId e) const
computes the center of given edge
Definition MRMesh.h:80
float edgeLength(UndirectedEdgeId e) const
returns Euclidean length of the edge
Definition MRMesh.h:145
void deleteFaces(const FaceBitSet &fs, const UndirectedEdgeBitSet *keepEdges=nullptr)
deletes multiple given faces, also deletes adjacent edges and vertices if they were not shared by rem...
MeshEdgePoint toEdgePoint(EdgeId e, const Vector3f &p) const
converts edge and 3d point into edge-point representation
Definition MRMesh.h:130
MR_BIND_IGNORE void getLeftTriPoints(EdgeId e, Vector3f(&v)[3]) const
Definition MRMesh.h:87
const AABBTreePoints & getAABBTreePoints() const
returns cached aabb-tree for points of this mesh, creating it if it did not exist in a thread-safe ma...
Vector3f dirDblArea(VertId v) const
computes sum of directed double areas of all triangles around given vertex
Definition MRMesh.h:211
Expected< VertBitSet > findSpikeVertices(float minSumAngle, const VertBitSet *region=nullptr, const ProgressCallback &cb={}) const
returns vertices where the sum of triangle angles is below given threshold
Definition MRMesh.h:273
double volume(const FaceBitSet *region=nullptr) const
Definition MRMesh.h:188
static Mesh fromTriangles(VertCoords vertexCoordinates, const Triangulation &t, const MeshBuilder::BuildSettings &settings={}, ProgressCallback cb={})
construct mesh from vertex coordinates and a set of triangles with given ids
static Mesh fromFaceSoup(VertCoords vertexCoordinates, const std::vector< VertId > &verts, const Vector< MeshBuilder::VertSpan, FaceId > &faces, const MeshBuilder::BuildSettings &settings={}, ProgressCallback cb={})
double projArea(const Vector3f &dir, const FaceBitSet *fs=nullptr) const
computes the sum of absolute projected area of faces from given region (or whole mesh) as visible if ...
Definition MRMesh.h:184
UndirectedEdgeId getClosestEdge(const PointOnFace &p) const
returns one of three face edges, closest to given point
Definition MRMesh.h:139
MeshTriPoint toTriPoint(const PointOnFace &p) const
converts face id and 3d point into barycentric representation
Definition MRMesh.h:124
static Mesh fromTriMesh(TriMesh &&triMesh, const MeshBuilder::BuildSettings &settings={}, ProgressCallback cb={})
construct mesh from TriMesh representation
MR_BIND_IGNORE void addPartByMask(const Mesh &from, const FaceBitSet &fromFaces, bool flipOrientation=false, const std::vector< EdgePath > &thisContours={}, const std::vector< EdgePath > &fromContours={}, const PartMapping &map={})
Definition MRMesh.h:411
Vector3f dirDblArea(FaceId f) const
computes directed double area for a triangular face from its vertices
Definition MRMesh.h:157
Vector3f normal(VertId v) const
computes normal in a vertex using sum of directed areas of neighboring triangles
Definition MRMesh.h:217
Definition MRBuffer.h:144
mapping among elements of source mesh, from which a part is taken, and target mesh
Definition MRPartMapping.h:13
a point located on some mesh's face
Definition MRPointOnFace.h:16
Definition MRTriMesh.h:16