adde barycenter()
This commit is contained in:
parent
89c3034fd9
commit
d4f068e4e0
vcg/space
|
@ -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){
|
||||
|
|
Loading…
Reference in New Issue