MeshLib C Docs
Loading...
Searching...
No Matches
MRMeshMath.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRBox.h>
4#include <MRCMesh/MRId.h>
5#include <MRCMesh/MRVector3.h>
6#include <MRCMisc/exports.h>
7#include <MRCMisc/std_array_MR_Vector3f_3.h>
8
9#include <stdbool.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15typedef struct MR_AffineXf3f MR_AffineXf3f; // Defined in `#include <MRCMesh/MRAffineXf.h>`.
16typedef struct MR_EdgePoint MR_EdgePoint; // Defined in `#include <MRCMesh/MREdgePoint.h>`.
17typedef struct MR_FaceBitSet MR_FaceBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
18typedef struct MR_LineSegm3f MR_LineSegm3f; // Defined in `#include <MRCMesh/MRLineSegm.h>`.
19typedef struct MR_MeshTopology MR_MeshTopology; // Defined in `#include <MRCMesh/MRMeshTopology.h>`.
20typedef struct MR_MeshTriPoint MR_MeshTriPoint; // Defined in `#include <MRCMesh/MRMeshTriPoint.h>`.
21typedef struct MR_Plane3d MR_Plane3d; // Defined in `#include <MRCMesh/MRPlane3.h>`.
22typedef struct MR_Plane3f MR_Plane3f; // Defined in `#include <MRCMesh/MRPlane3.h>`.
23typedef struct MR_PointOnFace MR_PointOnFace; // Defined in `#include <MRCMesh/MRPointOnFace.h>`.
24typedef struct MR_QuadraticForm3f MR_QuadraticForm3f; // Defined in `#include <MRCMesh/MRQuadraticForm.h>`.
25typedef struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
26typedef struct MR_UndirectedEdgeScalars MR_UndirectedEdgeScalars; // Defined in `#include <MRCMesh/MRVector.h>`.
27typedef struct MR_VertBitSet MR_VertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
28typedef struct MR_VertCoords MR_VertCoords; // Defined in `#include <MRCMesh/MRVector.h>`.
29typedef struct MR_expected_MR_VertBitSet_std_string MR_expected_MR_VertBitSet_std_string; // Defined in `#include <MRCMisc/expected_MR_VertBitSet_std_string.h>`.
30typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float; // Defined in `#include <MRCMisc/std_function_bool_from_float.h>`.
31
32
37MRC_API MR_Vector3f MR_orgPnt(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e);
38
43MRC_API MR_Vector3f MR_destPnt(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e);
44
49MRC_API MR_Vector3f MR_edgeVector(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e);
50
56MRC_API MR_LineSegm3f *MR_edgeSegment(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e);
57
62MRC_API MR_Vector3f MR_edgePoint_4(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e, float f);
63
69MRC_API MR_Vector3f MR_edgePoint_3(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_EdgePoint *ep);
70
76
84MRC_API void MR_getLeftTriPoints_6(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e, MR_Vector3f *v0, MR_Vector3f *v1, MR_Vector3f *v2);
85
91
99MRC_API void MR_getTriPoints_6(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f, MR_Vector3f *v0, MR_Vector3f *v1, MR_Vector3f *v2);
100
106
112MRC_API MR_Vector3f MR_triPoint(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_MeshTriPoint *p);
113
118MRC_API MR_Vector3f MR_triCenter(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f);
119
124MRC_API float MR_triangleAspectRatio(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f);
125
130MRC_API float MR_circumcircleDiameterSq(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f);
131
136MRC_API float MR_circumcircleDiameter(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f);
137
144MRC_API MR_MeshTriPoint *MR_toTriPoint_4(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f, const MR_Vector3f *p);
145
152MRC_API MR_MeshTriPoint *MR_toTriPoint_3(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_PointOnFace *p);
153
160MRC_API MR_EdgePoint *MR_toEdgePoint(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e, const MR_Vector3f *p);
161
168
175
182
189
194MRC_API float MR_edgeLength(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId e);
195
202
207MRC_API float MR_edgeLengthSq(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId e);
208
213MRC_API MR_Vector3f MR_leftDirDblArea(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e);
214
220
227MRC_API MR_VertCoords *MR_dirDblAreas(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_VertBitSet *region);
228
233MRC_API float MR_dblArea_MR_FaceId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f);
234
239MRC_API float MR_area_MR_FaceId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f);
240
246MRC_API double MR_area_const_MR_FaceBitSet_ptr(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_FaceBitSet *fs);
247
253MRC_API MR_Vector3d MR_dirArea(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_FaceBitSet *fs);
254
261MRC_API double MR_projArea(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_Vector3f *dir, const MR_FaceBitSet *fs);
262
269MRC_API double MR_volume(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_FaceBitSet *region);
270
275MRC_API double MR_holePerimeter(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e);
276
282MRC_API MR_Vector3d MR_holeDirArea(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e);
283
288MRC_API MR_Vector3f MR_leftTangent(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e);
289
294MRC_API MR_Vector3f MR_leftNormal(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e);
295
300MRC_API MR_Vector3f MR_normal_MR_FaceId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f);
301
307MRC_API MR_Plane3f *MR_getPlane3f(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f);
308
313MRC_API MR_Plane3d *MR_getPlane3d(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f);
314
320
325MRC_API float MR_dblArea_MR_VertId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v);
326
331MRC_API MR_Vector3f MR_normal_MR_VertId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v);
332
340
347MRC_API MR_Vector3f MR_pseudonormal_MR_VertId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v, const MR_FaceBitSet *region);
348
355
365MRC_API MR_Vector3f MR_pseudonormal_MR_MeshTriPoint(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_MeshTriPoint *p, const MR_FaceBitSet *region);
366
372MRC_API float MR_sumAngles(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v, bool *outBoundaryVert);
373
382MRC_API MR_expected_MR_VertBitSet_std_string *MR_findSpikeVertices(const MR_MeshTopology *topology, const MR_VertCoords *points, float minSumAngle, const MR_VertBitSet *region, const MR_std_function_bool_from_float *cb);
383
391MRC_API float MR_dihedralAngleSin(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId e);
392
400MRC_API float MR_dihedralAngleCos(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId e);
401
410MRC_API float MR_dihedralAngle(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId e);
411
417MRC_API float MR_discreteMeanCurvature_MR_VertId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v);
418
425
433MRC_API float MR_discreteGaussianCurvature(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v, bool *outBoundaryVert);
434
440MRC_API MR_UndirectedEdgeBitSet *MR_findCreaseEdges(const MR_MeshTopology *topology, const MR_VertCoords *points, float angleFromPlanar);
441
447MRC_API float MR_leftCotan(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e);
448
454MRC_API float MR_cotan(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId ue);
455
465MRC_API MR_QuadraticForm3f *MR_quadraticForm(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v, bool angleWeigted, const MR_FaceBitSet *region, const MR_UndirectedEdgeBitSet *creases);
466
473MRC_API MR_Box3f MR_computeBoundingBox(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_FaceBitSet *region, const MR_AffineXf3f *toWorld);
474
479MRC_API float MR_averageEdgeLength(const MR_MeshTopology *topology, const MR_VertCoords *points);
480
485MRC_API MR_Vector3f MR_findCenterFromPoints(const MR_MeshTopology *topology, const MR_VertCoords *points);
486
491MRC_API MR_Vector3f MR_findCenterFromFaces(const MR_MeshTopology *topology, const MR_VertCoords *points);
492
497MRC_API MR_Vector3f MR_findCenterFromBBox(const MR_MeshTopology *topology, const MR_VertCoords *points);
498
499#ifdef __cplusplus
500} // extern "C"
501#endif
struct MR_MeshTopology MR_MeshTopology
Definition MR2DContoursTriangulation.h:15
struct MR_std_function_bool_from_float MR_std_function_bool_from_float
Definition MR3mf.h:10
struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet
Definition MRAABBTreeBase.h:28
struct MR_VertCoords MR_VertCoords
Definition MRAABBTreePoints.h:21
struct MR_VertBitSet MR_VertBitSet
Definition MRAABBTree.h:22
struct MR_FaceBitSet MR_FaceBitSet
Definition MRAABBTree.h:17
struct MR_MeshTriPoint MR_MeshTriPoint
Definition MRAggregateFlow.h:13
struct MR_UndirectedEdgeScalars MR_UndirectedEdgeScalars
Definition MRAggregateFlow.h:16
struct MR_Plane3d MR_Plane3d
Definition MRBestFit.h:21
struct MR_Plane3f MR_Plane3f
Definition MRBestFit.h:22
struct MR_EdgePoint MR_EdgePoint
Definition MREdgePoint.h:22
struct MR_PointOnFace MR_PointOnFace
Definition MREnumNeighbours.h:15
struct MR_LineSegm3f MR_LineSegm3f
Definition MRFeatures.h:18
struct MR_std_array_MR_Vector3f_3 MR_std_array_MR_Vector3f_3
Definition MRMeshDistance.h:14
MRC_API MR_Plane3d * MR_getPlane3d(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f)
MRC_API double MR_holePerimeter(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e)
MRC_API float MR_dihedralAngle(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId e)
MRC_API MR_UndirectedEdgeScalars * MR_edgeLengths(const MR_MeshTopology *topology, const MR_VertCoords *points)
MRC_API MR_Vector3f MR_pseudonormal_MR_VertId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v, const MR_FaceBitSet *region)
MRC_API MR_VertId MR_getClosestVertex_MR_MeshTriPoint(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_MeshTriPoint *p)
MRC_API MR_Vector3f MR_destPnt(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e)
MRC_API float MR_area_MR_FaceId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f)
MRC_API MR_Vector3f MR_normal_MR_MeshTriPoint(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_MeshTriPoint *p)
MRC_API float MR_edgeLengthSq(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId e)
MRC_API float MR_dblArea_MR_VertId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v)
MRC_API MR_VertCoords * MR_dirDblAreas(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_VertBitSet *region)
MRC_API MR_LineSegm3f * MR_edgeSegment(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e)
MRC_API MR_Vector3f MR_pseudonormal_MR_MeshTriPoint(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_MeshTriPoint *p, const MR_FaceBitSet *region)
MRC_API MR_Vector3f MR_edgePoint_3(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_EdgePoint *ep)
MRC_API MR_VertId MR_getClosestVertex_MR_PointOnFace(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_PointOnFace *p)
MRC_API float MR_dblArea_MR_FaceId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f)
MRC_API float MR_circumcircleDiameterSq(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f)
MRC_API float MR_sumAngles(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v, bool *outBoundaryVert)
MRC_API MR_Vector3f MR_leftDirDblArea(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e)
MRC_API MR_Vector3f MR_edgePoint_4(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e, float f)
MRC_API float MR_averageEdgeLength(const MR_MeshTopology *topology, const MR_VertCoords *points)
MRC_API MR_expected_MR_VertBitSet_std_string * MR_findSpikeVertices(const MR_MeshTopology *topology, const MR_VertCoords *points, float minSumAngle, const MR_VertBitSet *region, const MR_std_function_bool_from_float *cb)
MRC_API MR_EdgePoint * MR_toEdgePoint(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e, const MR_Vector3f *p)
MRC_API MR_Box3f MR_computeBoundingBox(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_FaceBitSet *region, const MR_AffineXf3f *toWorld)
MRC_API MR_Vector3f MR_pseudonormal_MR_UndirectedEdgeId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId e, const MR_FaceBitSet *region)
MRC_API MR_Vector3f MR_leftNormal(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e)
MRC_API float MR_leftCotan(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e)
MRC_API MR_Vector3f MR_findCenterFromPoints(const MR_MeshTopology *topology, const MR_VertCoords *points)
MRC_API MR_UndirectedEdgeId MR_getClosestEdge_MR_PointOnFace(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_PointOnFace *p)
MRC_API MR_Vector3d MR_holeDirArea(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e)
MRC_API float MR_edgeLength(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId e)
MRC_API MR_std_array_MR_Vector3f_3 MR_getTriPoints_3(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f)
MRC_API void MR_getTriPoints_6(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f, MR_Vector3f *v0, MR_Vector3f *v1, MR_Vector3f *v2)
MRC_API double MR_volume(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_FaceBitSet *region)
MRC_API MR_UndirectedEdgeId MR_getClosestEdge_MR_MeshTriPoint(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_MeshTriPoint *p)
MRC_API MR_Vector3f MR_leftTangent(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e)
MRC_API MR_UndirectedEdgeBitSet * MR_findCreaseEdges(const MR_MeshTopology *topology, const MR_VertCoords *points, float angleFromPlanar)
MRC_API MR_Vector3f MR_triPoint(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_MeshTriPoint *p)
MRC_API MR_Vector3f MR_triCenter(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f)
MRC_API double MR_area_const_MR_FaceBitSet_ptr(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_FaceBitSet *fs)
MRC_API double MR_projArea(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_Vector3f *dir, const MR_FaceBitSet *fs)
MRC_API float MR_discreteGaussianCurvature(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v, bool *outBoundaryVert)
MRC_API void MR_getLeftTriPoints_6(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e, MR_Vector3f *v0, MR_Vector3f *v1, MR_Vector3f *v2)
MRC_API MR_Vector3f MR_edgeVector(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e)
MRC_API MR_Vector3f MR_normal_MR_FaceId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f)
MRC_API MR_Plane3f * MR_getPlane3f(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f)
MRC_API MR_std_array_MR_Vector3f_3 MR_getLeftTriPoints_3(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e)
MRC_API float MR_discreteMeanCurvature_MR_UndirectedEdgeId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId e)
MRC_API MR_MeshTriPoint * MR_toTriPoint_3(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_PointOnFace *p)
MRC_API MR_Vector3f MR_dirDblArea_MR_VertId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v)
MRC_API MR_Vector3f MR_orgPnt(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e)
MRC_API float MR_dihedralAngleSin(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId e)
MRC_API MR_Vector3f MR_normal_MR_VertId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v)
MRC_API MR_MeshTriPoint * MR_toTriPoint_4(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f, const MR_Vector3f *p)
MRC_API MR_Vector3f MR_findCenterFromFaces(const MR_MeshTopology *topology, const MR_VertCoords *points)
MRC_API MR_Vector3d MR_dirArea(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_FaceBitSet *fs)
MRC_API float MR_circumcircleDiameter(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f)
MRC_API MR_Vector3f MR_findCenterFromBBox(const MR_MeshTopology *topology, const MR_VertCoords *points)
MRC_API MR_Vector3f MR_dirDblArea_MR_FaceId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f)
MRC_API float MR_discreteMeanCurvature_MR_VertId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v)
MRC_API MR_QuadraticForm3f * MR_quadraticForm(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v, bool angleWeigted, const MR_FaceBitSet *region, const MR_UndirectedEdgeBitSet *creases)
MRC_API float MR_triangleAspectRatio(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f)
MRC_API float MR_cotan(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId ue)
MRC_API float MR_dihedralAngleCos(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId e)
MRC_API MR_Vector3f MR_edgeCenter(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId e)
struct MR_QuadraticForm3f MR_QuadraticForm3f
Definition MRMesh.h:35
struct MR_expected_MR_VertBitSet_std_string MR_expected_MR_VertBitSet_std_string
Definition MRMesh.h:46
Definition MRAffineXf.h:39
Definition MRBox.h:110
Definition MRId.h:153
Definition MRId.h:45
Definition MRId.h:35
Generated from class MR::Vector3d.
Definition MRVector3.h:55
Generated from class MR::Vector3f.
Definition MRVector3.h:47
Definition MRId.h:55