From ec3c53d1d5b1168433e36f459f6e9a2a701b86c9 Mon Sep 17 00:00:00 2001 From: cignoni Date: Mon, 5 Apr 2004 11:51:22 +0000 Subject: [PATCH] wrong define FACE_N instead of FACE_FN --- vcg/simplex/face/base.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/vcg/simplex/face/base.h b/vcg/simplex/face/base.h index fd97014e..c05c8e4a 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.4 2004/03/29 08:37:09 cignoni +missing include + Revision 1.3 2004/03/10 00:52:38 cignoni Moved geometric stuff to the space/triangle class @@ -199,29 +202,29 @@ protected: public: #endif - /// Return the reference of the normal to the face (if __VCGLIB_FACE_N is defined). + /// Return the reference of the normal to the face (if __VCGLIB_FACE_FN is defined). inline CoordType & N() { -#ifdef __VCGLIB_FACE_N +#ifdef __VCGLIB_FACE_FN return _n; #else assert(0); return *(CoordType *)0; #endif } - /// Return the reference of the normal to the face (if __VCGLIB_FACE_N is defined). + /// Return the reference of the normal to the face (if __VCGLIB_FACE_FN is defined). inline const CoordType & N() const { -#ifdef __VCGLIB_FACE_N +#ifdef __VCGLIB_FACE_FN return _n; #else return *(CoordType *)0; #endif } - /// Return the reference of the normal to the face (if __VCGLIB_FACE_N is defined). + /// Return the reference of the normal to the face (if __VCGLIB_FACE_FN is defined). inline const CoordType cN() const { -#ifdef __VCGLIB_FACE_N +#ifdef __VCGLIB_FACE_FN return _n; #else return *(CoordType *)0; @@ -231,15 +234,15 @@ public: /// Calculate the normal to the face, the value is store in the field _n of the face void ComputeNormal() { -#ifdef __VCGLIB_FACE_N - _n = vcg::Normal(V(0)->cP(), V(1)->cP(), V(2)->cP()); +#ifdef __VCGLIB_FACE_FN + _n = vcg::Normal(*this); #else assert(0); #endif } void ComputeNormalizedNormal() { -#ifdef __VCGLIB_FACE_N +#ifdef __VCGLIB_FACE_FN _n = vcg::NormalizedNormal(V(0)->cP(), V(1)->cP(), V(2)->cP()); #else assert(0);