Commit 83e2062c authored by Alen Cukrov's avatar Alen Cukrov
Browse files

Function for calculation the quality of tetrahedra.

parent 0f20cfba
...@@ -289,6 +289,9 @@ namespace help ...@@ -289,6 +289,9 @@ namespace help
DynList<bool>& OkPoints DynList<bool>& OkPoints
); );
//- calculate quality metric of a tetrahedron
inline scalar tetQuality(const tetrahedron<point, point>& tet);
//- check if the vertex is on the positive side of the face plane //- check if the vertex is on the positive side of the face plane
inline bool isVertexVisible(const point& p, const plane& pl); inline bool isVertexVisible(const point& p, const plane& pl);
......
...@@ -1612,6 +1612,17 @@ inline bool isFaceConvexAndOk ...@@ -1612,6 +1612,17 @@ inline bool isFaceConvexAndOk
return valid; return valid;
} }
inline scalar tetQuality(const tetrahedron<point, point>& tet)
{
return
tet.mag()
/(
8.0/(9.0*sqrt(3.0))
*pow3(min(tet.circumRadius(), GREAT))
+ ROOTVSMALL
);
}
inline point nearestPointOnTheEdge inline point nearestPointOnTheEdge
( (
const point& edgePoint0, const point& edgePoint0,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment