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>
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
38
44
50
57
62MRC_API MR_Vector3f MR_edgePoint_4(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e, float f);
63
70
76
85
91
100
106
113
119
125
131
137
145
153
161
168
175
182
189
195
202
208
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_MR_FaceBitSet(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_FaceBitSet *fs);
247
254
261
268
275MRC_API double MR_projArea_MR_FaceBitSet(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_Vector3f *dir, const MR_FaceBitSet *fs);
276
283MRC_API double MR_projArea_const_MR_FaceBitSet_ptr(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_Vector3f *dir, const MR_FaceBitSet *fs);
284
291MRC_API double MR_volume(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_FaceBitSet *region);
292
297MRC_API double MR_holePerimiter(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e);
298
305
311
317
323
330
336
342
347MRC_API float MR_dblArea_MR_VertId(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v);
348
354
362
370
377
388
394MRC_API float MR_sumAngles(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v, bool *outBoundaryVert);
395
405
414
423
433
440
447
455MRC_API float MR_discreteGaussianCurvature(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_VertId v, bool *outBoundaryVert);
456
462MRC_API MR_UndirectedEdgeBitSet *MR_findCreaseEdges(const MR_MeshTopology *topology, const MR_VertCoords *points, float angleFromPlanar);
463
469MRC_API float MR_leftCotan(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId e);
470
476MRC_API float MR_cotan(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_UndirectedEdgeId ue);
477
487MRC_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);
488
495MRC_API MR_Box3f MR_computeBoundingBox(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_FaceBitSet *region, const MR_AffineXf3f *toWorld);
496
501MRC_API float MR_averageEdgeLength(const MR_MeshTopology *topology, const MR_VertCoords *points);
502
508
514
520
521#ifdef __cplusplus
522} // extern "C"
523#endif
struct MR_MeshTopology MR_MeshTopology
Definition MR2DContoursTriangulation.h:16
struct MR_std_function_bool_from_float MR_std_function_bool_from_float
Definition MR3mf.h:10
struct MR_FaceBitSet MR_FaceBitSet
Definition MRAABBTreeBase.h:25
struct MR_UndirectedEdgeBitSet MR_UndirectedEdgeBitSet
Definition MRAABBTreeBase.h:29
struct MR_VertCoords MR_VertCoords
Definition MRAABBTreePoints.h:22
struct MR_VertBitSet MR_VertBitSet
Definition MRAABBTree.h:15
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:22
struct MR_Plane3f MR_Plane3f
Definition MRBestFit.h:23
struct MR_EdgePoint MR_EdgePoint
Definition MREdgePoint.h:21
struct MR_PointOnFace MR_PointOnFace
Definition MREnumNeighbours.h:15
struct MR_LineSegm3f MR_LineSegm3f
Definition MRFeatures.h:19
MRC_API MR_Plane3d * MR_getPlane3d(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_FaceId f)
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 double MR_projArea_const_MR_FaceBitSet_ptr(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_Vector3f *dir, const MR_FaceBitSet *fs)
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_Vector3d MR_dirArea_const_MR_FaceBitSet_ptr(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_FaceBitSet *fs)
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 double MR_projArea_MR_FaceBitSet(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_Vector3f *dir, const MR_FaceBitSet *fs)
MRC_API double MR_area_MR_FaceBitSet(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_FaceBitSet *fs)
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 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_Vector3d MR_dirArea_MR_FaceBitSet(const MR_MeshTopology *topology, const MR_VertCoords *points, const MR_FaceBitSet *fs)
MRC_API double MR_holePerimiter(const MR_MeshTopology *topology, const MR_VertCoords *points, MR_EdgeId 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 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
#define MRC_API
Definition exports.h:11
Definition MRAffineXf.h:36
Definition MRBox.h:109
Definition MRId.h:152
Definition MRId.h:46
Definition MRId.h:36
Definition MRVector3.h:60
Definition MRVector3.h:51
Definition MRId.h:56
A fixed-size array of MR::Vector3f of size 3.
Definition std_array_MR_Vector3f_3.h:12