From c630e4064da64e5690c90043cbffcd8a440ae2c9 Mon Sep 17 00:00:00 2001 From: Paolo Cignoni Date: Wed, 15 Mar 2017 13:13:51 +0100 Subject: [PATCH] Added angle measuring function for a pos --- vcg/simplex/face/pos.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vcg/simplex/face/pos.h b/vcg/simplex/face/pos.h index 1fff3d67..d6d0c735 100644 --- a/vcg/simplex/face/pos.h +++ b/vcg/simplex/face/pos.h @@ -332,7 +332,15 @@ public: { return face::IsManifold(*f,z); } - + + /*! + * Returns the angle (in radiant) between the two edges incident on V. + */ + ScalarType AngleRad() const + { + return Angle(f->V(f->Prev(z))->cP()-v->cP(), f->V(f->Next(z))->cP()-v->cP()); + } + /*! * Returns the number of vertices incident on the vertex pos is currently pointing to. */