From e7cd4edd1c7842a2e054f49119d3bbbbc1975300 Mon Sep 17 00:00:00 2001 From: Janis Born Date: Thu, 14 Mar 2019 16:59:07 +0100 Subject: [PATCH] add calc_face_area for TriMeshT --- src/OpenMesh/Core/Mesh/TriMeshT.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/OpenMesh/Core/Mesh/TriMeshT.hh b/src/OpenMesh/Core/Mesh/TriMeshT.hh index 7859a12b..f7992b48 100644 --- a/src/OpenMesh/Core/Mesh/TriMeshT.hh +++ b/src/OpenMesh/Core/Mesh/TriMeshT.hh @@ -411,6 +411,16 @@ public: */ inline void split_copy(FaceHandle _fh, VertexHandle _vh) { PolyMesh::split_copy(_fh, _vh); } + + /** \brief Calculates the area of a face + * + * @param _fh Handle of the face to calculate the area of + */ + Scalar calc_face_area(FaceHandle _fh) const + { + const HalfedgeHandle heh = this->halfedge_handle(_fh); + return this->calc_sector_area(heh); + } /** \name Normal vector computation */