adde barycenter()

This commit is contained in:
ganovelli 2006-07-06 12:39:51 +00:00
parent 89c3034fd9
commit d4f068e4e0
1 changed files with 10 additions and 0 deletions
vcg/space

View File

@ -24,6 +24,9 @@
History
$Log: not supported by cvs2svn $
Revision 1.13 2006/06/06 14:35:31 zifnab1974
Changes for compilation on linux AMD64. Some remarks: Linux filenames are case-sensitive. _fileno and _filelength do not exist on linux
Revision 1.12 2006/03/01 15:59:34 pietroni
added InterpolationParameters function
@ -477,6 +480,13 @@ ScalarType ComputeAspectRatio()
}; //end Class
// compute the barycenter
template<class ScalarType>
Point3<ScalarType> Barycenter(const Tetra3<ScalarType> &t)
{
return ((t.cP(0)+t.cP(1)+t.cP(2)+t.cP(3))/(ScalarType) 4.0);
}
// compute and return the volume of a tetrahedron
template<class TetraType>
typename TetraType::ScalarType ComputeVolume( const TetraType & t){