MeshLib Documentation
Loading...
Searching...
No Matches
MRTriMath.h File Reference
#include "MRVector3.h"
#include <algorithm>
#include <cmath>
#include <limits>
#include <optional>

Go to the source code of this file.

Namespaces

namespace  MR
 

Functions

template<typename T >
MR::circumcircleDiameterSq (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c)
 
template<typename T >
MR::circumcircleDiameter (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c)
 
template<typename T >
Vector3< T > MR::circumcircleCenter (const Vector3< T > &a, const Vector3< T > &b)
 Computes the center of the the triangle's 0AB circumcircle.
 
template<typename T >
Vector3< T > MR::circumcircleCenter (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c)
 Computes the center of the the triangle's ABC circumcircle.
 
template<typename T >
bool MR::circumballCenters (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c, T radius, Vector3< T > &centerPos, Vector3< T > &centerNeg)
 
template<typename T >
MR::minTriangleAngleSin (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c)
 
template<typename T >
MR::minTriangleAngle (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c)
 
template<typename T >
MR::triangleAspectRatio (const Vector3< T > &a, const Vector3< T > &b, const Vector3< T > &c)
 
template<typename T >
Vector3< T > MR::dirDblArea (const Triangle3< T > &t)
 computes directed double area of given triangle
 
template<typename T >
Vector3< T > MR::dirDblArea (const Vector3< T > &p, const Vector3< T > &q, const Vector3< T > &r)
 computes directed double area of given triangle
 
template<typename T >
Vector3< T > MR::normal (const Vector3< T > &p, const Vector3< T > &q, const Vector3< T > &r)
 computes unitNormal of given triangle
 
template<typename T >
MR::dblAreaSq (const Vector3< T > &p, const Vector3< T > &q, const Vector3< T > &r)
 computes the square of double area of given triangle
 
template<typename T >
MR::dblArea (const Vector3< T > &p, const Vector3< T > &q, const Vector3< T > &r)
 computes twice the area of given triangle
 
template<typename T >
MR::area (const Vector3< T > &p, const Vector3< T > &q, const Vector3< T > &r)
 computes twice the area of given triangle
 
template<typename T >
MR::dblArea (const Vector2< T > &p, const Vector2< T > &q, const Vector2< T > &r)
 computes twice the area of given triangle
 
template<typename T >
MR::area (const Vector2< T > &p, const Vector2< T > &q, const Vector2< T > &r)
 computes twice the area of given triangle
 
template<typename T >
Triangle3< T > MR::makeDegenerate (const Triangle3< T > &t)
 make degenerate triangle (all 3 points on a line) that maximally resembles the input one and has the same centroid
 
template<typename T >
Triangle3< T > MR::triangleWithNormal (const Triangle3< T > &t, const Vector3< T > &n)
 
template<typename T >
MR::dihedralAngleSin (const Vector3< T > &leftNorm, const Vector3< T > &rightNorm, const Vector3< T > &edgeVec)
 
template<typename T >
MR::dihedralAngleCos (const Vector3< T > &leftNorm, const Vector3< T > &rightNorm)
 
template<typename T >
MR::dihedralAngle (const Vector3< T > &leftNorm, const Vector3< T > &rightNorm, const Vector3< T > &edgeVec)
 
template<typename T >
std::optional< Vector2< T > > MR::posFromTriEdgeLengths (T a, T b, T c)
 
template<typename T >
std::optional< T > MR::quadrangleOtherDiagonal (T a, T b, T c, T a1, T b1)