From 67d370e4f463be747c3fe175e783cd2c157d7370 Mon Sep 17 00:00:00 2001 From: ganovelli Date: Thu, 6 Jul 2006 12:45:08 +0000 Subject: [PATCH] added SmallestEnclosingSphere --- vcg/simplex/face/base.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vcg/simplex/face/base.h b/vcg/simplex/face/base.h index 984eb387..0e1be1b8 100644 --- a/vcg/simplex/face/base.h +++ b/vcg/simplex/face/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.37 2006/01/22 10:00:43 cignoni +Very Important Change: Area->DoubleArea (and no more Area function) + Revision 1.36 2005/12/16 11:42:23 corsini Add some user bit @@ -141,6 +144,7 @@ First commit... #include #include #include +#include #include #include #include @@ -177,6 +181,8 @@ public: /// The type of the the vertex coordinate typedef Point3< ScalarType > CoordType; typedef Point3< ScalarType > NormalType; + /// The geometric type of the face + typedef Triangle3 GeometricType; typedef typename FVTYPE::FaceType FaceFromVertType; /// The bounding box type @@ -1172,6 +1178,11 @@ CoordType Barycenter() const return (V(0)->P()+V(1)->P()+V(2)->P())/ScalarType(3.0); } +Sphere3 SmallestEnclosingSphere() const +{ + return SmallestEnclosing::Sphere(*this); +} + ScalarType Perimeter() const { return Distance(V(0)->P(),V(1)->P())+