moved InterpolationParameters function after the Normal function definition

This commit is contained in:
granzuglia 2010-10-06 12:58:09 +00:00
parent e2b56e9023
commit b3d63c7c64
1 changed files with 7 additions and 8 deletions

View File

@ -204,14 +204,6 @@ bool InterpolationParameters(const TriangleType t, const Point3<ScalarType> & N,
} }
} }
/// Handy Wrapper of the above one that calculate the normal on the triangle
template<class TriangleType, class ScalarType>
bool InterpolationParameters(const TriangleType t, const Point3<ScalarType> & P, Point3<ScalarType> & L)
{
Point3<ScalarType> N=vcg::Normal<TriangleType>(t);
return (InterpolationParameters<TriangleType,ScalarType>(t,N,P,L));
}
// Function that computes the barycentric coords of a 2D triangle. Used by the above function. // Function that computes the barycentric coords of a 2D triangle. Used by the above function.
// Algorithm: simply find a base for the frame of the triangle, assuming v3 as origin (matrix T) invert it and apply to P-v3. // Algorithm: simply find a base for the frame of the triangle, assuming v3 as origin (matrix T) invert it and apply to P-v3.
@ -446,6 +438,13 @@ Point3Type NormalizedNormal( Point3Type const &p0, Point3Type const & p1, Point
} }
/// Handy Wrapper of the above one that calculate the normal on the triangle
template<class TriangleType, class ScalarType>
bool InterpolationParameters(const TriangleType t, const Point3<ScalarType> & P, Point3<ScalarType> & L)
{
vcg::Point3<ScalarType> N=vcg::Normal<TriangleType>(t);
return (InterpolationParameters<TriangleType,ScalarType>(t,N,P,L));
}
/// Return the Double of area of the triangle /// Return the Double of area of the triangle
// NOTE the old Area function has been removed to intentionally // NOTE the old Area function has been removed to intentionally