Volume Cartographer 2.27.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Functions
volcart::meshmath Namespace Reference

Mesh mathematical operations. More...

Functions

template<typename T , std::enable_if_t< std::is_floating_point< T >::value, bool > = true>
TriangleArea (T a, T b, T c)
 Calculate the area of a triangle given its side lengths. More...
 
double SurfaceArea (const ITKMesh::Pointer &mesh)
 Calculate the surface area of an ITKMesh.
 

Detailed Description

Mesh mathematical operations.

Function Documentation

◆ TriangleArea()

template<typename T , std::enable_if_t< std::is_floating_point< T >::value, bool > = true>
T volcart::meshmath::TriangleArea ( a,
b,
c 
)

Calculate the area of a triangle given its side lengths.

Uses a version of Heron's formula that is stable for small angles.

Definition at line 26 of file MeshMath.hpp.