From 92c21e838d3dc1ac0aee71c8cf57475110ad3a0a Mon Sep 17 00:00:00 2001 From: cignoni Date: Sun, 22 Jan 2006 10:00:56 +0000 Subject: [PATCH] Very Important Change: Area->DoubleArea (and no more Area function) --- vcg/simplex/face/base.h | 10 +++++++++- vcg/space/triangle3.h | 13 +++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/vcg/simplex/face/base.h b/vcg/simplex/face/base.h index 56befc9f..984eb387 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.36 2005/12/16 11:42:23 corsini +Add some user bit + Revision 1.35 2005/12/01 23:54:29 cignoni Added HasFlags @@ -1154,7 +1157,12 @@ const ScalarType EPSILON = ScalarType(0.000001); /// Return the DOUBLE of the area of the face -ScalarType Area() const +// NOTE the old Area function has been removed to intentionally +// cause compiling error that will help people to check their code... +// A some people used Area assuming that it returns the double and some not. +// So please check your codes!!! +// And please DO NOT Insert any Area named function here! +ScalarType DoubleArea() const { return ( (V(1)->cP() - V(0)->cP()) ^ (V(2)->cP() - V(0)->P()) ).Norm(); } diff --git a/vcg/space/triangle3.h b/vcg/space/triangle3.h index c3446dda..05fc8479 100644 --- a/vcg/space/triangle3.h +++ b/vcg/space/triangle3.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.5 2005/09/23 14:18:27 ganovelli +added constructor + Revision 1.4 2005/04/14 11:35:09 ponchio *** empty log message *** @@ -251,9 +254,15 @@ Point3 NormalizedNormal(const TriangleType &t return (( t.P(1) - t.P(0)) ^ (t.P(2) - t.P(0))).Normalize(); } -/// Return the area of the triangle +/// Return the Double of area of the triangle +// NOTE the old Area function has been removed to intentionally +// cause compiling error that will help people to check their code... +// A some people used Area assuming that it returns the double and some not. +// So please check your codes!!! +// And please DO NOT Insert any Area named function here! + template -typename TriangleType::ScalarType Area(const TriangleType &t) +typename TriangleType::ScalarType DoubleArea(const TriangleType &t) { return Norm( (t.P(1) - t.P(0)) ^ (t.P(2) - t.P(0)) ); }