Moved ComputeNormal and ComputeNormalizedNormal out of the face class (no more a member function!)
This commit is contained in:
parent
8725c0bccf
commit
dbc5a559c4
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.8 2005/11/21 21:44:43 cignoni
|
||||||
|
Moved ComputeNormal and ComputeNormalizedNormal out of the face class (no more a member function!)
|
||||||
|
|
||||||
Revision 1.7 2005/10/13 08:38:00 cignoni
|
Revision 1.7 2005/10/13 08:38:00 cignoni
|
||||||
removed the access to the face member function normal and substituted with vcg::normal(*f);
|
removed the access to the face member function normal and substituted with vcg::normal(*f);
|
||||||
|
|
||||||
|
@ -85,7 +88,7 @@ static void PerFace(ComputeMeshType &m)
|
||||||
if( !m.HasPerFaceNormal()) return;
|
if( !m.HasPerFaceNormal()) return;
|
||||||
FaceIterator f;
|
FaceIterator f;
|
||||||
for(f=m.face.begin();f!=m.face.end();++f)
|
for(f=m.face.begin();f!=m.face.end();++f)
|
||||||
if( !(*f).IsD() ) ComputeNormal(*f);
|
if( !(*f).IsD() ) face::ComputeNormal(*f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.32 2005/11/12 18:39:54 cignoni
|
||||||
|
Added dummy static member for avoiding annoying warning in empty functions...
|
||||||
|
|
||||||
Revision 1.31 2005/11/01 18:16:36 cignoni
|
Revision 1.31 2005/11/01 18:16:36 cignoni
|
||||||
Added intialization of _flags to zero in the default constructor of face
|
Added intialization of _flags to zero in the default constructor of face
|
||||||
|
|
||||||
|
@ -324,24 +327,6 @@ public:
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Calculate the normal to the face, the value is store in the field _n of the face
|
|
||||||
void ComputeNormal()
|
|
||||||
{
|
|
||||||
#ifdef __VCGLIB_FACE_FN
|
|
||||||
_n = vcg::Normal(*this);
|
|
||||||
#else
|
|
||||||
assert(0);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
void ComputeNormalizedNormal()
|
|
||||||
{
|
|
||||||
#ifdef __VCGLIB_FACE_FN
|
|
||||||
_n = vcg::NormalizedNormal(*this);
|
|
||||||
#else
|
|
||||||
assert(0);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Return the value of the face normal as it correspond to the current geometry.
|
/// Return the value of the face normal as it correspond to the current geometry.
|
||||||
/// it is always computed and never stored.
|
/// it is always computed and never stored.
|
||||||
const CoordType Normal() const
|
const CoordType Normal() const
|
||||||
|
@ -1223,7 +1208,17 @@ inline void Nexts( BaseFaceType *&f,int &z )
|
||||||
|
|
||||||
}; //end Class
|
}; //end Class
|
||||||
|
|
||||||
|
/// Calculate the normal to the face, the value is store in the field _n of the face
|
||||||
|
namespace face
|
||||||
|
{
|
||||||
|
|
||||||
|
template <class MyVertex, class MyEdge, class MyFace>
|
||||||
|
void ComputeNormal(FACE_TYPE<MyVertex,MyEdge,MyFace> &f) { f.N() = vcg::Normal< FACE_TYPE<MyVertex,MyEdge,MyFace> >(f); }
|
||||||
|
|
||||||
|
template <class MyVertex, class MyEdge, class MyFace>
|
||||||
|
void ComputeNormalizedNormal(FACE_TYPE<MyVertex,MyEdge,MyFace> &f) { f.N() = vcg::NormalizedNormal< FACE_TYPE<MyVertex,MyEdge,MyFace> >(f); }
|
||||||
|
|
||||||
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
} // end namespace
|
} // end namespace
|
||||||
|
|
Loading…
Reference in New Issue