MeshLib C Docs
Loading...
Searching...
No Matches
MRTriMath.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRVector3.h>
4#include <MRCMisc/exports.h>
7
8#include <stdbool.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef struct MR_Vector2d MR_Vector2d; // Defined in `#include <MRCMesh/MRVector2.h>`.
15typedef struct MR_Vector2f MR_Vector2f; // Defined in `#include <MRCMesh/MRVector2.h>`.
16typedef struct MR_std_optional_MR_Plane3d MR_std_optional_MR_Plane3d; // Defined in `#include <MRCMisc/std_optional_MR_Plane3d.h>`.
17typedef struct MR_std_optional_MR_Plane3f MR_std_optional_MR_Plane3f; // Defined in `#include <MRCMisc/std_optional_MR_Plane3f.h>`.
18typedef struct MR_std_optional_MR_Vector2d MR_std_optional_MR_Vector2d; // Defined in `#include <MRCMisc/std_optional_MR_Vector2d.h>`.
19typedef struct MR_std_optional_MR_Vector2f MR_std_optional_MR_Vector2f; // Defined in `#include <MRCMisc/std_optional_MR_Vector2f.h>`.
20typedef struct MR_std_optional_MR_Vector3d MR_std_optional_MR_Vector3d; // Defined in `#include <MRCMisc/std_optional_MR_Vector3d.h>`.
21typedef struct MR_std_optional_MR_Vector3f MR_std_optional_MR_Vector3f; // Defined in `#include <MRCMisc/std_optional_MR_Vector3f.h>`.
22typedef struct MR_std_optional_double MR_std_optional_double; // Defined in `#include <MRCMisc/std_optional_double.h>`.
23typedef struct MR_std_optional_float MR_std_optional_float; // Defined in `#include <MRCMisc/std_optional_float.h>`.
24
25
32
39
46
53
61
69
77
85
95
105
111
117
124
131
140MRC_API bool MR_circumballCenters_float(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c, float radius, MR_Vector3f *centerPos, MR_Vector3f *centerNeg);
141
150MRC_API bool MR_circumballCenters_double(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c, double radius, MR_Vector3d *centerPos, MR_Vector3d *centerNeg);
151
158
165
171
177
184
191
196
201
207
213
220
227
233
239
246
253
258
263
270
276MRC_API double MR_dblAreaSq_double(const MR_Vector3d *p, const MR_Vector3d *q, const MR_Vector3d *r);
277
282
287
294
301
308
315
322
329
336
343
348
353
360
367
376MRC_API float MR_dihedralAngleSin_float(const MR_Vector3f *leftNorm, const MR_Vector3f *rightNorm, const MR_Vector3f *edgeVec);
377
386MRC_API double MR_dihedralAngleSin_double(const MR_Vector3d *leftNorm, const MR_Vector3d *rightNorm, const MR_Vector3d *edgeVec);
387
395MRC_API float MR_dihedralAngleCos_float(const MR_Vector3f *leftNorm, const MR_Vector3f *rightNorm);
396
404MRC_API double MR_dihedralAngleCos_double(const MR_Vector3d *leftNorm, const MR_Vector3d *rightNorm);
405
415MRC_API float MR_dihedralAngle_float(const MR_Vector3f *leftNorm, const MR_Vector3f *rightNorm, const MR_Vector3f *edgeVec);
416
426MRC_API double MR_dihedralAngle_double(const MR_Vector3d *leftNorm, const MR_Vector3d *rightNorm, const MR_Vector3d *edgeVec);
427
434
441
447MRC_API MR_std_optional_float *MR_quadrangleOtherDiagonal_float(float a, float b, float c, float a1, float b1);
448
454MRC_API MR_std_optional_double *MR_quadrangleOtherDiagonal_double(double a, double b, double c, double a1, double b1);
455
460MRC_API float MR_tanSqOfHalfAngle_float(float a, float b, float c);
461
466MRC_API double MR_tanSqOfHalfAngle_double(double a, double b, double c);
467
473MRC_API float MR_cotan_float_2(const MR_std_array_MR_Vector3f_3 *t, const float *absMaxVal);
474
480MRC_API double MR_cotan_double_2(const MR_std_array_MR_Vector3d_3 *t, const double *absMaxVal);
481
486MRC_API float MR_cotan_float_3(float a, float b, float c);
487
492MRC_API double MR_cotan_double_3(double a, double b, double c);
493
501
509
517MRC_API MR_std_optional_MR_Vector3f *MR_gradientInTri_float_6(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c, float va, float vb, float vc);
518
526MRC_API MR_std_optional_MR_Vector3d *MR_gradientInTri_double_6(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c, double va, double vb, double vc);
527
528// consider triangle 0BC, where gradient of linear scalar field is given;
529// computes the intersection of the ray (org=0, dir=-grad) with the open line segment BC
536
537// consider triangle 0BC, where gradient of linear scalar field is given;
538// computes the intersection of the ray (org=0, dir=-grad) with the open line segment BC
545
557
569
581MRC_API MR_std_optional_MR_Plane3f *MR_tangentPlaneToSpheres_float(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c, float ra, float rb, float rc);
582
594MRC_API MR_std_optional_MR_Plane3d *MR_tangentPlaneToSpheres_double(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c, double ra, double rb, double rc);
595
596#ifdef __cplusplus
597} // extern "C"
598#endif
struct MR_std_optional_MR_Vector3f MR_std_optional_MR_Vector3f
Definition MRAddVisualPropertiesMixin.h:34
struct MR_std_optional_float MR_std_optional_float
Definition MRBestFitPolynomial.h:13
struct MR_std_optional_double MR_std_optional_double
Definition MRBestFitPolynomial.h:12
struct MR_std_optional_MR_Vector2f MR_std_optional_MR_Vector2f
Definition MRCNCMachineSettings.h:15
MRC_API double MR_coveringRadiusSq_double(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API float MR_tanSqOfHalfAngle_float(float a, float b, float c)
MRC_API MR_std_optional_double * MR_findTriExitPos_double(const MR_Vector3d *b, const MR_Vector3d *c, const MR_Vector3d *grad)
MRC_API MR_Vector3f MR_dirDblArea_float_1(const MR_std_array_MR_Vector3f_3 *t)
struct MR_std_optional_MR_Vector3d MR_std_optional_MR_Vector3d
Definition MRTriMath.h:20
MRC_API float MR_dihedralAngleSin_float(const MR_Vector3f *leftNorm, const MR_Vector3f *rightNorm, const MR_Vector3f *edgeVec)
MRC_API MR_std_optional_MR_Plane3d * MR_tangentPlaneToSpheres_double(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c, double ra, double rb, double rc)
MRC_API float MR_dblArea_float_3_MR_Vector3f(const MR_Vector3f *p, const MR_Vector3f *q, const MR_Vector3f *r)
MRC_API float MR_cotan_float_2(const MR_std_array_MR_Vector3f_3 *t, const float *absMaxVal)
MRC_API bool MR_circumballCenters_double(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c, double radius, MR_Vector3d *centerPos, MR_Vector3d *centerNeg)
MRC_API double MR_area_double_MR_Vector3d(const MR_Vector3d *p, const MR_Vector3d *q, const MR_Vector3d *r)
MRC_API float MR_mincircleDiameterSq_float(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API MR_std_optional_double * MR_quadrangleOtherDiagonal_double(double a, double b, double c, double a1, double b1)
MRC_API double MR_circumcircleDiameterSq_double(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API MR_Vector3f MR_normal_float_1(const MR_std_array_MR_Vector3f_3 *t)
MRC_API float MR_triangleAspectRatio_float(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API MR_std_optional_MR_Vector3f * MR_tangentPlaneNormalToSpheres_float(const MR_Vector3f *b, const MR_Vector3f *c, float rb, float rc)
MRC_API MR_std_optional_float * MR_findTriExitPos_float(const MR_Vector3f *b, const MR_Vector3f *c, const MR_Vector3f *grad)
MRC_API MR_Vector3f MR_normal_float_2(const MR_Vector3f *q, const MR_Vector3f *r)
MRC_API double MR_area_double_MR_Vector2d(const MR_Vector2d *p, const MR_Vector2d *q, const MR_Vector2d *r)
MRC_API double MR_circumcircleDiameter_double(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API float MR_dblAreaSq_float(const MR_Vector3f *p, const MR_Vector3f *q, const MR_Vector3f *r)
MRC_API double MR_dihedralAngle_double(const MR_Vector3d *leftNorm, const MR_Vector3d *rightNorm, const MR_Vector3d *edgeVec)
MRC_API MR_Vector3d MR_dirDblArea_double_2(const MR_Vector3d *q, const MR_Vector3d *r)
MRC_API double MR_tanSqOfHalfAngle_double(double a, double b, double c)
MRC_API MR_Vector3d MR_circumcircleCenter_double_3(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API double MR_mincircleDiameterSq_double(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API MR_std_optional_float * MR_quadrangleOtherDiagonal_float(float a, float b, float c, float a1, float b1)
MRC_API MR_Vector3d MR_normal_double_3(const MR_Vector3d *p, const MR_Vector3d *q, const MR_Vector3d *r)
MRC_API MR_Vector3f MR_circumcircleCenter_float_3(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API double MR_cotan_double_2(const MR_std_array_MR_Vector3d_3 *t, const double *absMaxVal)
MRC_API MR_std_array_MR_Vector3d_3 MR_makeDegenerate_double(const MR_std_array_MR_Vector3d_3 *t)
MRC_API float MR_area_float_MR_Vector2f(const MR_Vector2f *p, const MR_Vector2f *q, const MR_Vector2f *r)
MRC_API MR_std_optional_MR_Vector3f * MR_gradientInTri_float_6(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c, float va, float vb, float vc)
MRC_API MR_Vector3d MR_normal_double_1(const MR_std_array_MR_Vector3d_3 *t)
MRC_API float MR_cotan_float_3(float a, float b, float c)
MRC_API MR_std_array_MR_Vector3d_3 MR_triangleWithNormal_double(const MR_std_array_MR_Vector3d_3 *t, const MR_Vector3d *n)
MRC_API MR_Vector3d MR_normal_double_2(const MR_Vector3d *q, const MR_Vector3d *r)
struct MR_std_optional_MR_Plane3d MR_std_optional_MR_Plane3d
Definition MRTriMath.h:16
MRC_API MR_Vector3f MR_dirDblArea_float_3(const MR_Vector3f *p, const MR_Vector3f *q, const MR_Vector3f *r)
MRC_API float MR_dblArea_float_1(const MR_std_array_MR_Vector3f_3 *t)
MRC_API float MR_minTriangleAngleSin_float(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API float MR_circumcircleDiameter_float(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API MR_std_optional_MR_Vector3d * MR_gradientInTri_double_6(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c, double va, double vb, double vc)
MRC_API MR_std_array_MR_Vector3f_3 MR_makeDegenerate_float(const MR_std_array_MR_Vector3f_3 *t)
MRC_API bool MR_circumballCenters_float(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c, float radius, MR_Vector3f *centerPos, MR_Vector3f *centerNeg)
MRC_API float MR_coveringRadiusSq_float(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
struct MR_std_optional_MR_Plane3f MR_std_optional_MR_Plane3f
Definition MRTriMath.h:17
MRC_API double MR_minTriangleAngle_double(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API double MR_minTriangleAngleSin_double(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API MR_std_optional_MR_Vector3d * MR_tangentPlaneNormalToSpheres_double(const MR_Vector3d *b, const MR_Vector3d *c, double rb, double rc)
MRC_API float MR_minTriangleAngle_float(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API MR_std_optional_MR_Vector3d * MR_gradientInTri_double_4(const MR_Vector3d *b, const MR_Vector3d *c, double vb, double vc)
MRC_API float MR_dihedralAngleCos_float(const MR_Vector3f *leftNorm, const MR_Vector3f *rightNorm)
MRC_API float MR_edgeCoveringRadiusSq_float(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API double MR_cotan_double_3(double a, double b, double c)
struct MR_std_optional_MR_Vector2d MR_std_optional_MR_Vector2d
Definition MRTriMath.h:18
MRC_API MR_Vector3f MR_normal_float_3(const MR_Vector3f *p, const MR_Vector3f *q, const MR_Vector3f *r)
MRC_API MR_std_array_MR_Vector3f_3 MR_triangleWithNormal_float(const MR_std_array_MR_Vector3f_3 *t, const MR_Vector3f *n)
MRC_API MR_Vector3d MR_circumcircleCenter_double_2(const MR_Vector3d *a, const MR_Vector3d *b)
MRC_API float MR_circumcircleDiameterSq_float(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API MR_Vector3d MR_dirDblArea_double_3(const MR_Vector3d *p, const MR_Vector3d *q, const MR_Vector3d *r)
MRC_API float MR_dblArea_float_3_MR_Vector2f(const MR_Vector2f *p, const MR_Vector2f *q, const MR_Vector2f *r)
MRC_API MR_Vector3d MR_dirDblArea_double_1(const MR_std_array_MR_Vector3d_3 *t)
MRC_API MR_std_optional_MR_Plane3f * MR_tangentPlaneToSpheres_float(const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c, float ra, float rb, float rc)
MRC_API double MR_dblArea_double_1(const MR_std_array_MR_Vector3d_3 *t)
MRC_API MR_Vector3f MR_circumcircleCenter_float_2(const MR_Vector3f *a, const MR_Vector3f *b)
MRC_API double MR_triangleAspectRatio_double(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API double MR_dblArea_double_3_MR_Vector2d(const MR_Vector2d *p, const MR_Vector2d *q, const MR_Vector2d *r)
MRC_API double MR_dblAreaSq_double(const MR_Vector3d *p, const MR_Vector3d *q, const MR_Vector3d *r)
MRC_API float MR_area_float_MR_Vector3f(const MR_Vector3f *p, const MR_Vector3f *q, const MR_Vector3f *r)
MRC_API MR_std_optional_MR_Vector3f * MR_gradientInTri_float_4(const MR_Vector3f *b, const MR_Vector3f *c, float vb, float vc)
MRC_API double MR_edgeCoveringRadiusSq_double(const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API MR_Vector3f MR_dirDblArea_float_2(const MR_Vector3f *q, const MR_Vector3f *r)
MRC_API double MR_dihedralAngleCos_double(const MR_Vector3d *leftNorm, const MR_Vector3d *rightNorm)
MRC_API MR_std_optional_MR_Vector2d * MR_posFromTriEdgeLengths_double(double a, double b, double c)
MRC_API double MR_dihedralAngleSin_double(const MR_Vector3d *leftNorm, const MR_Vector3d *rightNorm, const MR_Vector3d *edgeVec)
MRC_API MR_std_optional_MR_Vector2f * MR_posFromTriEdgeLengths_float(float a, float b, float c)
MRC_API double MR_dblArea_double_3_MR_Vector3d(const MR_Vector3d *p, const MR_Vector3d *q, const MR_Vector3d *r)
MRC_API float MR_dihedralAngle_float(const MR_Vector3f *leftNorm, const MR_Vector3f *rightNorm, const MR_Vector3f *edgeVec)
#define MRC_API
Definition include/MRCMisc/exports.h:11
Generated from class MR::Vector2d.
Definition MRVector2.h:43
Generated from class MR::Vector2f.
Definition MRVector2.h:36
Generated from class MR::Vector3d.
Definition MRVector3.h:55
Generated from class MR::Vector3f.
Definition MRVector3.h:47
A fixed-size array of MR::Vector3d of size 3.
Definition std_array_MR_Vector3d_3.h:12
A fixed-size array of MR::Vector3f of size 3.
Definition std_array_MR_Vector3f_3.h:12