MeshLib C Docs
Loading...
Searching...
No Matches
MRTriMath.h File Reference
#include <MRCMesh/MRVector3.h>
#include <MRCMisc/exports.h>
#include <MRCMisc/std_array_MR_Vector3d_3.h>
#include <MRCMisc/std_array_MR_Vector3f_3.h>
#include <stdbool.h>

Go to the source code of this file.

Typedefs

typedef struct MR_std_optional_MR_Plane3d MR_std_optional_MR_Plane3d
typedef struct MR_std_optional_MR_Plane3f MR_std_optional_MR_Plane3f
typedef struct MR_std_optional_MR_Vector2d MR_std_optional_MR_Vector2d
typedef struct MR_std_optional_MR_Vector3d MR_std_optional_MR_Vector3d

Functions

MRC_API float MR_circumcircleDiameterSq_float (const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API double MR_circumcircleDiameterSq_double (const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API float MR_circumcircleDiameter_float (const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API double MR_circumcircleDiameter_double (const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API float MR_mincircleDiameterSq_float (const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API double MR_mincircleDiameterSq_double (const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API MR_Vector3f MR_circumcircleCenter_float_2 (const MR_Vector3f *a, const MR_Vector3f *b)
MRC_API MR_Vector3d MR_circumcircleCenter_double_2 (const MR_Vector3d *a, const MR_Vector3d *b)
MRC_API MR_Vector3f MR_circumcircleCenter_float_3 (const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API MR_Vector3d MR_circumcircleCenter_double_3 (const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
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 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 float MR_minTriangleAngleSin_float (const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API double MR_minTriangleAngleSin_double (const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API float MR_minTriangleAngle_float (const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API double MR_minTriangleAngle_double (const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API float MR_triangleAspectRatio_float (const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c)
MRC_API double MR_triangleAspectRatio_double (const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c)
MRC_API MR_Vector3f MR_dirDblArea_float_1 (const MR_std_array_MR_Vector3f_3 *t)
MRC_API MR_Vector3d MR_dirDblArea_double_1 (const MR_std_array_MR_Vector3d_3 *t)
MRC_API MR_Vector3f MR_dirDblArea_float_2 (const MR_Vector3f *q, const MR_Vector3f *r)
MRC_API MR_Vector3d MR_dirDblArea_double_2 (const MR_Vector3d *q, const MR_Vector3d *r)
MRC_API MR_Vector3f MR_dirDblArea_float_3 (const MR_Vector3f *p, const MR_Vector3f *q, const MR_Vector3f *r)
MRC_API MR_Vector3d MR_dirDblArea_double_3 (const MR_Vector3d *p, const MR_Vector3d *q, const MR_Vector3d *r)
MRC_API MR_Vector3f MR_normal_float_2 (const MR_Vector3f *q, const MR_Vector3f *r)
MRC_API MR_Vector3d MR_normal_double_2 (const MR_Vector3d *q, const MR_Vector3d *r)
MRC_API MR_Vector3f MR_normal_float_3 (const MR_Vector3f *p, const MR_Vector3f *q, const MR_Vector3f *r)
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_normal_float_1 (const MR_std_array_MR_Vector3f_3 *t)
MRC_API MR_Vector3d MR_normal_double_1 (const MR_std_array_MR_Vector3d_3 *t)
MRC_API float MR_dblAreaSq_float (const MR_Vector3f *p, const MR_Vector3f *q, const MR_Vector3f *r)
MRC_API double MR_dblAreaSq_double (const MR_Vector3d *p, const MR_Vector3d *q, const MR_Vector3d *r)
MRC_API float MR_dblArea_float_1 (const MR_std_array_MR_Vector3f_3 *t)
MRC_API double MR_dblArea_double_1 (const MR_std_array_MR_Vector3d_3 *t)
MRC_API float MR_dblArea_float_3_MR_Vector3f (const MR_Vector3f *p, const MR_Vector3f *q, const MR_Vector3f *r)
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_area_float_MR_Vector3f (const MR_Vector3f *p, const MR_Vector3f *q, const MR_Vector3f *r)
MRC_API double MR_area_double_MR_Vector3d (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 double MR_dblArea_double_3_MR_Vector2d (const MR_Vector2d *p, const MR_Vector2d *q, const MR_Vector2d *r)
MRC_API float MR_area_float_MR_Vector2f (const MR_Vector2f *p, const MR_Vector2f *q, const MR_Vector2f *r)
MRC_API double MR_area_double_MR_Vector2d (const MR_Vector2d *p, const MR_Vector2d *q, const MR_Vector2d *r)
MRC_API MR_std_array_MR_Vector3f_3 MR_makeDegenerate_float (const MR_std_array_MR_Vector3f_3 *t)
MRC_API MR_std_array_MR_Vector3d_3 MR_makeDegenerate_double (const MR_std_array_MR_Vector3d_3 *t)
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_std_array_MR_Vector3d_3 MR_triangleWithNormal_double (const MR_std_array_MR_Vector3d_3 *t, const MR_Vector3d *n)
MRC_API float MR_dihedralAngleSin_float (const MR_Vector3f *leftNorm, const MR_Vector3f *rightNorm, const MR_Vector3f *edgeVec)
MRC_API double MR_dihedralAngleSin_double (const MR_Vector3d *leftNorm, const MR_Vector3d *rightNorm, const MR_Vector3d *edgeVec)
MRC_API float MR_dihedralAngleCos_float (const MR_Vector3f *leftNorm, const MR_Vector3f *rightNorm)
MRC_API double MR_dihedralAngleCos_double (const MR_Vector3d *leftNorm, const MR_Vector3d *rightNorm)
MRC_API float MR_dihedralAngle_float (const MR_Vector3f *leftNorm, const MR_Vector3f *rightNorm, const MR_Vector3f *edgeVec)
MRC_API double MR_dihedralAngle_double (const MR_Vector3d *leftNorm, const MR_Vector3d *rightNorm, const MR_Vector3d *edgeVec)
MRC_API MR_std_optional_MR_Vector2fMR_posFromTriEdgeLengths_float (float a, float b, float c)
MRC_API MR_std_optional_MR_Vector2dMR_posFromTriEdgeLengths_double (double a, double b, double c)
MRC_API MR_std_optional_floatMR_quadrangleOtherDiagonal_float (float a, float b, float c, float a1, float b1)
MRC_API MR_std_optional_doubleMR_quadrangleOtherDiagonal_double (double a, double b, double c, double a1, double b1)
MRC_API float MR_tanSqOfHalfAngle_float (float a, float b, float c)
MRC_API double MR_tanSqOfHalfAngle_double (double a, double b, double c)
MRC_API float MR_cotan_float_2 (const MR_std_array_MR_Vector3f_3 *t, const float *absMaxVal)
MRC_API double MR_cotan_double_2 (const MR_std_array_MR_Vector3d_3 *t, const double *absMaxVal)
MRC_API float MR_cotan_float_3 (float a, float b, float c)
MRC_API double MR_cotan_double_3 (double a, double b, double c)
MRC_API MR_std_optional_MR_Vector3fMR_gradientInTri_float_4 (const MR_Vector3f *b, const MR_Vector3f *c, float vb, float vc)
MRC_API MR_std_optional_MR_Vector3dMR_gradientInTri_double_4 (const MR_Vector3d *b, const MR_Vector3d *c, double vb, double vc)
MRC_API MR_std_optional_MR_Vector3fMR_gradientInTri_float_6 (const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c, float va, float vb, float vc)
MRC_API MR_std_optional_MR_Vector3dMR_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_optional_floatMR_findTriExitPos_float (const MR_Vector3f *b, const MR_Vector3f *c, const MR_Vector3f *grad)
MRC_API MR_std_optional_doubleMR_findTriExitPos_double (const MR_Vector3d *b, const MR_Vector3d *c, const MR_Vector3d *grad)
MRC_API MR_std_optional_MR_Vector3fMR_tangentPlaneNormalToSpheres_float (const MR_Vector3f *b, const MR_Vector3f *c, float rb, float rc)
MRC_API MR_std_optional_MR_Vector3dMR_tangentPlaneNormalToSpheres_double (const MR_Vector3d *b, const MR_Vector3d *c, double rb, double rc)
MRC_API MR_std_optional_MR_Plane3fMR_tangentPlaneToSpheres_float (const MR_Vector3f *a, const MR_Vector3f *b, const MR_Vector3f *c, float ra, float rb, float rc)
MRC_API MR_std_optional_MR_Plane3dMR_tangentPlaneToSpheres_double (const MR_Vector3d *a, const MR_Vector3d *b, const MR_Vector3d *c, double ra, double rb, double rc)

Typedef Documentation

◆ MR_std_optional_MR_Plane3d

Stores either a single MR::Plane3d or nothing. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_std_optional_MR_Plane3f

Stores either a single MR::Plane3f or nothing. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_std_optional_MR_Vector2d

Stores either a single MR::Vector2d or nothing. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_std_optional_MR_Vector3d

Stores either a single MR::Vector3d or nothing. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

Function Documentation

◆ MR_area_double_MR_Vector2d()

MRC_API double MR_area_double_MR_Vector2d ( const MR_Vector2d * p,
const MR_Vector2d * q,
const MR_Vector2d * r )

computes twice the area of given triangle Generated from function MR::area<double>. Parameter p can not be null. It is a single object. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_area_double_MR_Vector3d()

MRC_API double MR_area_double_MR_Vector3d ( const MR_Vector3d * p,
const MR_Vector3d * q,
const MR_Vector3d * r )

computes twice the area of given triangle Generated from function MR::area<double>. Parameter p can not be null. It is a single object. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_area_float_MR_Vector2f()

MRC_API float MR_area_float_MR_Vector2f ( const MR_Vector2f * p,
const MR_Vector2f * q,
const MR_Vector2f * r )

computes twice the area of given triangle Generated from function MR::area<float>. Parameter p can not be null. It is a single object. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_area_float_MR_Vector3f()

MRC_API float MR_area_float_MR_Vector3f ( const MR_Vector3f * p,
const MR_Vector3f * q,
const MR_Vector3f * r )

computes twice the area of given triangle Generated from function MR::area<float>. Parameter p can not be null. It is a single object. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_circumballCenters_double()

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 )

Given triangle ABC and ball radius, finds two centers of balls each touching all 3 triangle's vertices;

Returns
false if such balls do not exist (radius is smaller that circumcircle radius) Generated from function MR::circumballCenters<double>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Parameter centerPos can not be null. It is a single object. Parameter centerNeg can not be null. It is a single object.

◆ MR_circumballCenters_float()

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 )

Given triangle ABC and ball radius, finds two centers of balls each touching all 3 triangle's vertices;

Returns
false if such balls do not exist (radius is smaller that circumcircle radius) Generated from function MR::circumballCenters<float>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Parameter centerPos can not be null. It is a single object. Parameter centerNeg can not be null. It is a single object.

◆ MR_circumcircleCenter_double_2()

MRC_API MR_Vector3d MR_circumcircleCenter_double_2 ( const MR_Vector3d * a,
const MR_Vector3d * b )

Computes the center of the the triangle's 0AB circumcircle Generated from function MR::circumcircleCenter<double>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object.

◆ MR_circumcircleCenter_double_3()

MRC_API MR_Vector3d MR_circumcircleCenter_double_3 ( const MR_Vector3d * a,
const MR_Vector3d * b,
const MR_Vector3d * c )

Computes the center of the the triangle's ABC circumcircle Generated from function MR::circumcircleCenter<double>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.

◆ MR_circumcircleCenter_float_2()

MRC_API MR_Vector3f MR_circumcircleCenter_float_2 ( const MR_Vector3f * a,
const MR_Vector3f * b )

Computes the center of the the triangle's 0AB circumcircle Generated from function MR::circumcircleCenter<float>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object.

◆ MR_circumcircleCenter_float_3()

MRC_API MR_Vector3f MR_circumcircleCenter_float_3 ( const MR_Vector3f * a,
const MR_Vector3f * b,
const MR_Vector3f * c )

Computes the center of the the triangle's ABC circumcircle Generated from function MR::circumcircleCenter<float>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.

◆ MR_circumcircleDiameter_double()

MRC_API double MR_circumcircleDiameter_double ( const MR_Vector3d * a,
const MR_Vector3d * b,
const MR_Vector3d * c )

Computes the diameter of the triangle's ABC circumcircle Generated from function MR::circumcircleDiameter<double>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.

◆ MR_circumcircleDiameter_float()

MRC_API float MR_circumcircleDiameter_float ( const MR_Vector3f * a,
const MR_Vector3f * b,
const MR_Vector3f * c )

Computes the diameter of the triangle's ABC circumcircle Generated from function MR::circumcircleDiameter<float>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.

◆ MR_circumcircleDiameterSq_double()

MRC_API double MR_circumcircleDiameterSq_double ( const MR_Vector3d * a,
const MR_Vector3d * b,
const MR_Vector3d * c )

Computes the squared diameter of the triangle's ABC circumcircle; Generated from function MR::circumcircleDiameterSq<double>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.

◆ MR_circumcircleDiameterSq_float()

MRC_API float MR_circumcircleDiameterSq_float ( const MR_Vector3f * a,
const MR_Vector3f * b,
const MR_Vector3f * c )

Computes the squared diameter of the triangle's ABC circumcircle; Generated from function MR::circumcircleDiameterSq<float>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.

◆ MR_cotan_double_2()

MRC_API double MR_cotan_double_2 ( const MR_std_array_MR_Vector3d_3 * t,
const double * absMaxVal )

given triangle by its three vertices: t[0], t[1], t[2], returns the cotangent of the angle at t[2], but not larger by magnitude than absMaxVal Generated from function MR::cotan<double>. Parameter t can not be null. It is a single object. Parameter absMaxVal has a default argument: std::numeric_limits<double>::max(), pass a null pointer to use it.

◆ MR_cotan_double_3()

MRC_API double MR_cotan_double_3 ( double a,
double b,
double c )

given (a, b, c) - the side lengths of a triangle, returns the cotangent of the angle opposite the side with length a see "An Algorithm for the Construction of Intrinsic Delaunay Triangulations with Applications to Digital Geometry Processing". https://page.math.tu-berlin.de/~bobenko/papers/InDel.pdf Generated from function MR::cotan<double>.

◆ MR_cotan_float_2()

MRC_API float MR_cotan_float_2 ( const MR_std_array_MR_Vector3f_3 * t,
const float * absMaxVal )

given triangle by its three vertices: t[0], t[1], t[2], returns the cotangent of the angle at t[2], but not larger by magnitude than absMaxVal Generated from function MR::cotan<float>. Parameter t can not be null. It is a single object. Parameter absMaxVal has a default argument: std::numeric_limits<float>::max(), pass a null pointer to use it.

◆ MR_cotan_float_3()

MRC_API float MR_cotan_float_3 ( float a,
float b,
float c )

given (a, b, c) - the side lengths of a triangle, returns the cotangent of the angle opposite the side with length a see "An Algorithm for the Construction of Intrinsic Delaunay Triangulations with Applications to Digital Geometry Processing". https://page.math.tu-berlin.de/~bobenko/papers/InDel.pdf Generated from function MR::cotan<float>.

◆ MR_dblArea_double_1()

MRC_API double MR_dblArea_double_1 ( const MR_std_array_MR_Vector3d_3 * t)

computes twice the area of given triangle Generated from function MR::dblArea<double>. Parameter t can not be null. It is a single object.

◆ MR_dblArea_double_3_MR_Vector2d()

MRC_API double MR_dblArea_double_3_MR_Vector2d ( const MR_Vector2d * p,
const MR_Vector2d * q,
const MR_Vector2d * r )

computes twice the area of given triangle Generated from function MR::dblArea<double>. Parameter p can not be null. It is a single object. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_dblArea_double_3_MR_Vector3d()

MRC_API double MR_dblArea_double_3_MR_Vector3d ( const MR_Vector3d * p,
const MR_Vector3d * q,
const MR_Vector3d * r )

computes twice the area of given triangle Generated from function MR::dblArea<double>. Parameter p can not be null. It is a single object. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_dblArea_float_1()

MRC_API float MR_dblArea_float_1 ( const MR_std_array_MR_Vector3f_3 * t)

computes twice the area of given triangle Generated from function MR::dblArea<float>. Parameter t can not be null. It is a single object.

◆ MR_dblArea_float_3_MR_Vector2f()

MRC_API float MR_dblArea_float_3_MR_Vector2f ( const MR_Vector2f * p,
const MR_Vector2f * q,
const MR_Vector2f * r )

computes twice the area of given triangle Generated from function MR::dblArea<float>. Parameter p can not be null. It is a single object. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_dblArea_float_3_MR_Vector3f()

MRC_API float MR_dblArea_float_3_MR_Vector3f ( const MR_Vector3f * p,
const MR_Vector3f * q,
const MR_Vector3f * r )

computes twice the area of given triangle Generated from function MR::dblArea<float>. Parameter p can not be null. It is a single object. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_dblAreaSq_double()

MRC_API double MR_dblAreaSq_double ( const MR_Vector3d * p,
const MR_Vector3d * q,
const MR_Vector3d * r )

computes the square of double area of given triangle Generated from function MR::dblAreaSq<double>. Parameter p can not be null. It is a single object. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_dblAreaSq_float()

MRC_API float MR_dblAreaSq_float ( const MR_Vector3f * p,
const MR_Vector3f * q,
const MR_Vector3f * r )

computes the square of double area of given triangle Generated from function MR::dblAreaSq<float>. Parameter p can not be null. It is a single object. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_dihedralAngle_double()

MRC_API double MR_dihedralAngle_double ( const MR_Vector3d * leftNorm,
const MR_Vector3d * rightNorm,
const MR_Vector3d * edgeVec )

given an edge direction between two faces with given normals (not necessary of unit length), computes the dihedral angle between the faces: 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 function MR::dihedralAngle<double>. Parameter leftNorm can not be null. It is a single object. Parameter rightNorm can not be null. It is a single object. Parameter edgeVec can not be null. It is a single object.

◆ MR_dihedralAngle_float()

MRC_API float MR_dihedralAngle_float ( const MR_Vector3f * leftNorm,
const MR_Vector3f * rightNorm,
const MR_Vector3f * edgeVec )

given an edge direction between two faces with given normals (not necessary of unit length), computes the dihedral angle between the faces: 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 function MR::dihedralAngle<float>. Parameter leftNorm can not be null. It is a single object. Parameter rightNorm can not be null. It is a single object. Parameter edgeVec can not be null. It is a single object.

◆ MR_dihedralAngleCos_double()

MRC_API double MR_dihedralAngleCos_double ( const MR_Vector3d * leftNorm,
const MR_Vector3d * rightNorm )

given two face normals, computes cosine of dihedral angle between the faces: 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 function MR::dihedralAngleCos<double>. Parameter leftNorm can not be null. It is a single object. Parameter rightNorm can not be null. It is a single object.

◆ MR_dihedralAngleCos_float()

MRC_API float MR_dihedralAngleCos_float ( const MR_Vector3f * leftNorm,
const MR_Vector3f * rightNorm )

given two face normals, computes cosine of dihedral angle between the faces: 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 function MR::dihedralAngleCos<float>. Parameter leftNorm can not be null. It is a single object. Parameter rightNorm can not be null. It is a single object.

◆ MR_dihedralAngleSin_double()

MRC_API double MR_dihedralAngleSin_double ( const MR_Vector3d * leftNorm,
const MR_Vector3d * rightNorm,
const MR_Vector3d * edgeVec )

given an edge direction between two faces with given normals, computes sine of dihedral angle between the faces: 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 function MR::dihedralAngleSin<double>. Parameter leftNorm can not be null. It is a single object. Parameter rightNorm can not be null. It is a single object. Parameter edgeVec can not be null. It is a single object.

◆ MR_dihedralAngleSin_float()

MRC_API float MR_dihedralAngleSin_float ( const MR_Vector3f * leftNorm,
const MR_Vector3f * rightNorm,
const MR_Vector3f * edgeVec )

given an edge direction between two faces with given normals, computes sine of dihedral angle between the faces: 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 function MR::dihedralAngleSin<float>. Parameter leftNorm can not be null. It is a single object. Parameter rightNorm can not be null. It is a single object. Parameter edgeVec can not be null. It is a single object.

◆ MR_dirDblArea_double_1()

MRC_API MR_Vector3d MR_dirDblArea_double_1 ( const MR_std_array_MR_Vector3d_3 * t)

computes directed double area of given triangle Generated from function MR::dirDblArea<double>. Parameter t can not be null. It is a single object.

◆ MR_dirDblArea_double_2()

MRC_API MR_Vector3d MR_dirDblArea_double_2 ( const MR_Vector3d * q,
const MR_Vector3d * r )

computes directed double area of triangle 0QR Generated from function MR::dirDblArea<double>. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_dirDblArea_double_3()

MRC_API MR_Vector3d MR_dirDblArea_double_3 ( const MR_Vector3d * p,
const MR_Vector3d * q,
const MR_Vector3d * r )

computes directed double area of triangle PQR Generated from function MR::dirDblArea<double>. Parameter p can not be null. It is a single object. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_dirDblArea_float_1()

MRC_API MR_Vector3f MR_dirDblArea_float_1 ( const MR_std_array_MR_Vector3f_3 * t)

computes directed double area of given triangle Generated from function MR::dirDblArea<float>. Parameter t can not be null. It is a single object.

◆ MR_dirDblArea_float_2()

MRC_API MR_Vector3f MR_dirDblArea_float_2 ( const MR_Vector3f * q,
const MR_Vector3f * r )

computes directed double area of triangle 0QR Generated from function MR::dirDblArea<float>. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_dirDblArea_float_3()

MRC_API MR_Vector3f MR_dirDblArea_float_3 ( const MR_Vector3f * p,
const MR_Vector3f * q,
const MR_Vector3f * r )

computes directed double area of triangle PQR Generated from function MR::dirDblArea<float>. Parameter p can not be null. It is a single object. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_findTriExitPos_double()

MRC_API MR_std_optional_double * MR_findTriExitPos_double ( const MR_Vector3d * b,
const MR_Vector3d * c,
const MR_Vector3d * grad )

Generated from function MR::findTriExitPos<double>. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Parameter grad can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_double_Destroy() to free it when you're done using it.

◆ MR_findTriExitPos_float()

MRC_API MR_std_optional_float * MR_findTriExitPos_float ( const MR_Vector3f * b,
const MR_Vector3f * c,
const MR_Vector3f * grad )

Generated from function MR::findTriExitPos<float>. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Parameter grad can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_float_Destroy() to free it when you're done using it.

◆ MR_gradientInTri_double_4()

MRC_API MR_std_optional_MR_Vector3d * MR_gradientInTri_double_4 ( const MR_Vector3d * b,
const MR_Vector3d * c,
double vb,
double vc )

Consider triangle 0BC, where a linear scalar field is defined in all 3 vertices: v(0) = 0, v(b) = vb, v(c) = vc; returns field gradient in the triangle or std::nullopt if the triangle is degenerate Generated from function MR::gradientInTri<double>. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_Vector3d_Destroy() to free it when you're done using it.

◆ MR_gradientInTri_double_6()

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 )

Consider triangle ABC, where a linear scalar field is defined in all 3 vertices: v(a) = va, v(b) = vb, v(c) = vc; returns field gradient in the triangle or std::nullopt if the triangle is degenerate Generated from function MR::gradientInTri<double>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_Vector3d_Destroy() to free it when you're done using it.

◆ MR_gradientInTri_float_4()

MRC_API MR_std_optional_MR_Vector3f * MR_gradientInTri_float_4 ( const MR_Vector3f * b,
const MR_Vector3f * c,
float vb,
float vc )

Consider triangle 0BC, where a linear scalar field is defined in all 3 vertices: v(0) = 0, v(b) = vb, v(c) = vc; returns field gradient in the triangle or std::nullopt if the triangle is degenerate Generated from function MR::gradientInTri<float>. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_Vector3f_Destroy() to free it when you're done using it.

◆ MR_gradientInTri_float_6()

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 )

Consider triangle ABC, where a linear scalar field is defined in all 3 vertices: v(a) = va, v(b) = vb, v(c) = vc; returns field gradient in the triangle or std::nullopt if the triangle is degenerate Generated from function MR::gradientInTri<float>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_Vector3f_Destroy() to free it when you're done using it.

◆ MR_makeDegenerate_double()

MRC_API MR_std_array_MR_Vector3d_3 MR_makeDegenerate_double ( const MR_std_array_MR_Vector3d_3 * t)

make degenerate triangle (all 3 points on a line) that maximally resembles the input one and has the same centroid Generated from function MR::makeDegenerate<double>. Parameter t can not be null. It is a single object.

◆ MR_makeDegenerate_float()

MRC_API MR_std_array_MR_Vector3f_3 MR_makeDegenerate_float ( const MR_std_array_MR_Vector3f_3 * t)

make degenerate triangle (all 3 points on a line) that maximally resembles the input one and has the same centroid Generated from function MR::makeDegenerate<float>. Parameter t can not be null. It is a single object.

◆ MR_mincircleDiameterSq_double()

MRC_API double MR_mincircleDiameterSq_double ( const MR_Vector3d * a,
const MR_Vector3d * b,
const MR_Vector3d * c )

Computes the squared diameter of the smallest enclosed circle around ABC; For acute triangles it is the same as circumcircle, for obtuse triangles - the circle with the longest triangle's edge as a diameter Generated from function MR::mincircleDiameterSq<double>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.

◆ MR_mincircleDiameterSq_float()

MRC_API float MR_mincircleDiameterSq_float ( const MR_Vector3f * a,
const MR_Vector3f * b,
const MR_Vector3f * c )

Computes the squared diameter of the smallest enclosed circle around ABC; For acute triangles it is the same as circumcircle, for obtuse triangles - the circle with the longest triangle's edge as a diameter Generated from function MR::mincircleDiameterSq<float>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.

◆ MR_minTriangleAngle_double()

MRC_API double MR_minTriangleAngle_double ( const MR_Vector3d * a,
const MR_Vector3d * b,
const MR_Vector3d * c )

Generated from function MR::minTriangleAngle<double>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.

◆ MR_minTriangleAngle_float()

MRC_API float MR_minTriangleAngle_float ( const MR_Vector3f * a,
const MR_Vector3f * b,
const MR_Vector3f * c )

Generated from function MR::minTriangleAngle<float>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.

◆ MR_minTriangleAngleSin_double()

MRC_API double MR_minTriangleAngleSin_double ( const MR_Vector3d * a,
const MR_Vector3d * b,
const MR_Vector3d * c )

Computes sine of minimal angle in ABC triangle, which is equal to ratio of minimal edge length to circumcircle diameter Generated from function MR::minTriangleAngleSin<double>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.

◆ MR_minTriangleAngleSin_float()

MRC_API float MR_minTriangleAngleSin_float ( const MR_Vector3f * a,
const MR_Vector3f * b,
const MR_Vector3f * c )

Computes sine of minimal angle in ABC triangle, which is equal to ratio of minimal edge length to circumcircle diameter Generated from function MR::minTriangleAngleSin<float>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.

◆ MR_normal_double_1()

MRC_API MR_Vector3d MR_normal_double_1 ( const MR_std_array_MR_Vector3d_3 * t)

computes unit normal of the given triangle Generated from function MR::normal<double>. Parameter t can not be null. It is a single object.

◆ MR_normal_double_2()

MRC_API MR_Vector3d MR_normal_double_2 ( const MR_Vector3d * q,
const MR_Vector3d * r )

computes unit normal of triangle 0QR Generated from function MR::normal<double>. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_normal_double_3()

MRC_API MR_Vector3d MR_normal_double_3 ( const MR_Vector3d * p,
const MR_Vector3d * q,
const MR_Vector3d * r )

computes unit normal of triangle PQR Generated from function MR::normal<double>. Parameter p can not be null. It is a single object. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_normal_float_1()

MRC_API MR_Vector3f MR_normal_float_1 ( const MR_std_array_MR_Vector3f_3 * t)

computes unit normal of the given triangle Generated from function MR::normal<float>. Parameter t can not be null. It is a single object.

◆ MR_normal_float_2()

MRC_API MR_Vector3f MR_normal_float_2 ( const MR_Vector3f * q,
const MR_Vector3f * r )

computes unit normal of triangle 0QR Generated from function MR::normal<float>. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_normal_float_3()

MRC_API MR_Vector3f MR_normal_float_3 ( const MR_Vector3f * p,
const MR_Vector3f * q,
const MR_Vector3f * r )

computes unit normal of triangle PQR Generated from function MR::normal<float>. Parameter p can not be null. It is a single object. Parameter q can not be null. It is a single object. Parameter r can not be null. It is a single object.

◆ MR_posFromTriEdgeLengths_double()

MRC_API MR_std_optional_MR_Vector2d * MR_posFromTriEdgeLengths_double ( double a,
double b,
double c )

given the lengths of 3 edges of triangle ABC, and assuming that point B has coordinates (0,0); point A - (0,c); computes the coordinates of point C (where c.x >= 0) or returns std::nullopt if input lengths are invalid for a triangle Generated from function MR::posFromTriEdgeLengths<double>. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_Vector2d_Destroy() to free it when you're done using it.

◆ MR_posFromTriEdgeLengths_float()

MRC_API MR_std_optional_MR_Vector2f * MR_posFromTriEdgeLengths_float ( float a,
float b,
float c )

given the lengths of 3 edges of triangle ABC, and assuming that point B has coordinates (0,0); point A - (0,c); computes the coordinates of point C (where c.x >= 0) or returns std::nullopt if input lengths are invalid for a triangle Generated from function MR::posFromTriEdgeLengths<float>. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_Vector2f_Destroy() to free it when you're done using it.

◆ MR_quadrangleOtherDiagonal_double()

MRC_API MR_std_optional_double * MR_quadrangleOtherDiagonal_double ( double a,
double b,
double c,
double a1,
double b1 )

given two triangles on same plane sharing one side, with edge lengths in same order: (a, b, c) and (b1, a1, c); they can be considered as a quadrangle with a diagonal of length (c); and the lengths of consecutive edges (a, b, b1, a1); returns the length of the other quadrangle's diagonal if the quadrangle is valid and convex or std::nullopt otherwise Generated from function MR::quadrangleOtherDiagonal<double>. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_double_Destroy() to free it when you're done using it.

◆ MR_quadrangleOtherDiagonal_float()

MRC_API MR_std_optional_float * MR_quadrangleOtherDiagonal_float ( float a,
float b,
float c,
float a1,
float b1 )

given two triangles on same plane sharing one side, with edge lengths in same order: (a, b, c) and (b1, a1, c); they can be considered as a quadrangle with a diagonal of length (c); and the lengths of consecutive edges (a, b, b1, a1); returns the length of the other quadrangle's diagonal if the quadrangle is valid and convex or std::nullopt otherwise Generated from function MR::quadrangleOtherDiagonal<float>. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_float_Destroy() to free it when you're done using it.

◆ MR_tangentPlaneNormalToSpheres_double()

MRC_API MR_std_optional_MR_Vector3d * MR_tangentPlaneNormalToSpheres_double ( const MR_Vector3d * b,
const MR_Vector3d * c,
double rb,
double rc )

Given 3 spheres: 1) sphere with center at b and radius rb 2) sphere with center at c and radius rc 3) sphere with center at the origin and zero radius (actually point); finds the plane touching all 3 spheres: dot(n,x) = 0, such that cross( n, b, c ) > 0 (to select one of two planes) returns n or std::nullopt if no touch plane exists Generated from function MR::tangentPlaneNormalToSpheres<double>. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_Vector3d_Destroy() to free it when you're done using it.

◆ MR_tangentPlaneNormalToSpheres_float()

MRC_API MR_std_optional_MR_Vector3f * MR_tangentPlaneNormalToSpheres_float ( const MR_Vector3f * b,
const MR_Vector3f * c,
float rb,
float rc )

Given 3 spheres: 1) sphere with center at b and radius rb 2) sphere with center at c and radius rc 3) sphere with center at the origin and zero radius (actually point); finds the plane touching all 3 spheres: dot(n,x) = 0, such that cross( n, b, c ) > 0 (to select one of two planes) returns n or std::nullopt if no touch plane exists Generated from function MR::tangentPlaneNormalToSpheres<float>. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_Vector3f_Destroy() to free it when you're done using it.

◆ MR_tangentPlaneToSpheres_double()

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 )

Given 3 spheres: 1) sphere with center at a and radius ra 2) sphere with center at b and radius rb 3) sphere with center at c and radius rc finds the plane touching all 3 spheres: dot(n,x) = d, such that cross( n, b-a, c-a ) > 0 (to select one of two planes) returns found plane or std::nullopt if no touch plane exists Generated from function MR::tangentPlaneToSpheres<double>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_Plane3d_Destroy() to free it when you're done using it.

◆ MR_tangentPlaneToSpheres_float()

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 )

Given 3 spheres: 1) sphere with center at a and radius ra 2) sphere with center at b and radius rb 3) sphere with center at c and radius rc finds the plane touching all 3 spheres: dot(n,x) = d, such that cross( n, b-a, c-a ) > 0 (to select one of two planes) returns found plane or std::nullopt if no touch plane exists Generated from function MR::tangentPlaneToSpheres<float>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_std_optional_MR_Plane3f_Destroy() to free it when you're done using it.

◆ MR_tanSqOfHalfAngle_double()

MRC_API double MR_tanSqOfHalfAngle_double ( double a,
double b,
double c )

given (a, b, c) - the side lengths of a triangle, returns the squared tangent of half angle opposite the side with length (a) see "An Algorithm for the Construction of Intrinsic Delaunay Triangulations with Applications to Digital Geometry Processing". https://page.math.tu-berlin.de/~bobenko/papers/InDel.pdf Generated from function MR::tanSqOfHalfAngle<double>.

◆ MR_tanSqOfHalfAngle_float()

MRC_API float MR_tanSqOfHalfAngle_float ( float a,
float b,
float c )

given (a, b, c) - the side lengths of a triangle, returns the squared tangent of half angle opposite the side with length (a) see "An Algorithm for the Construction of Intrinsic Delaunay Triangulations with Applications to Digital Geometry Processing". https://page.math.tu-berlin.de/~bobenko/papers/InDel.pdf Generated from function MR::tanSqOfHalfAngle<float>.

◆ MR_triangleAspectRatio_double()

MRC_API double MR_triangleAspectRatio_double ( const MR_Vector3d * a,
const MR_Vector3d * b,
const MR_Vector3d * c )

Aspect ratio of a triangle is the ratio of the circum-radius to twice its in-radius Generated from function MR::triangleAspectRatio<double>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.

◆ MR_triangleAspectRatio_float()

MRC_API float MR_triangleAspectRatio_float ( const MR_Vector3f * a,
const MR_Vector3f * b,
const MR_Vector3f * c )

Aspect ratio of a triangle is the ratio of the circum-radius to twice its in-radius Generated from function MR::triangleAspectRatio<float>. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object. Parameter c can not be null. It is a single object.

◆ MR_triangleWithNormal_double()

MRC_API MR_std_array_MR_Vector3d_3 MR_triangleWithNormal_double ( const MR_std_array_MR_Vector3d_3 * t,
const MR_Vector3d * n )

project given triangle on a plane passing via its centroid and having unit normal (n); if after projection triangle normal turns out to be inversed, then collapses the triangle into degenerate line segment Generated from function MR::triangleWithNormal<double>. Parameter t can not be null. It is a single object. Parameter n can not be null. It is a single object.

◆ MR_triangleWithNormal_float()

MRC_API MR_std_array_MR_Vector3f_3 MR_triangleWithNormal_float ( const MR_std_array_MR_Vector3f_3 * t,
const MR_Vector3f * n )

project given triangle on a plane passing via its centroid and having unit normal (n); if after projection triangle normal turns out to be inversed, then collapses the triangle into degenerate line segment Generated from function MR::triangleWithNormal<float>. Parameter t can not be null. It is a single object. Parameter n can not be null. It is a single object.