Removed a dubious function from TTL library.

This commit is contained in:
Maciej Suminski 2015-06-04 14:54:08 +02:00
parent 209e630873
commit 0cb649b3b0
1 changed files with 20 additions and 67 deletions

View File

@ -146,9 +146,6 @@ public:
template <class TRAITS_TYPE, class POINT_TYPE, class DART_TYPE>
static bool LocateTriangle( const POINT_TYPE& aPoint, DART_TYPE& aDart );
template <class TRAITS_TYPE, class POINT_TYPE, class DART_TYPE>
static bool InTriangleSimplest( const POINT_TYPE& aPoint, const DART_TYPE& aDart );
template <class TRAITS_TYPE, class POINT_TYPE, class DART_TYPE>
static bool InTriangle( const POINT_TYPE& aPoint, const DART_TYPE& aDart );
@ -721,50 +718,6 @@ bool TRIANGULATION_HELPER::LocateTriangle( const POINT_TYPE& aPoint, DART_TYPE&
return InTriangle<TRAITS_TYPE>( aPoint, aDart );
}
//------------------------------------------------------------------------------------------------
/** Checks if \e point is inside the triangle associated with \e dart.
* A fast and simple function that does not deal with degeneracy.
*
* \param aDart
* A CCW dart in the triangle
*
* \require
* - \ref hed::TTLtraits::Orient2D "TRAITS_TYPE::Orient2D" (DART_TYPE&, DART_TYPE&, POINT_TYPE&)
*
* \see
* InTriangle for a more robust function
*/
template <class TRAITS_TYPE, class POINT_TYPE, class DART_TYPE>
bool TRIANGULATION_HELPER::InTriangleSimplest( const POINT_TYPE& aPoint, const DART_TYPE& aDart )
{
// Fast and simple: Do not deal with degenerate faces, i.e., if there is
// degeneracy, true will be returned if the point is on the extension of the
// edges of a degenerate triangle
DART_TYPE d_iter = aDart;
DART_TYPE d0 = d_iter;
d0.Alpha0();
if( !TRAITS_TYPE::Orient2D( d_iter, d0, aPoint ) >= 0 )
return false;
d_iter.Alpha0().Alpha1();
d0 = d_iter;
d0.Alpha0();
if( !TRAITS_TYPE::Orient2D( d_iter, d0, aPoint ) >= 0 )
return false;
d_iter.Alpha0().Alpha1();
d0 = d_iter;
d0.Alpha0();
if( !TRAITS_TYPE::Orient2D( d_iter, d0, aPoint ) >= 0 )
return false;
return true;
}
/** Checks if \e point is inside the triangle associated with \e dart.
* This function deals with degeneracy to some extent, but round-off errors may still
* lead to wrong result if the triangle is degenerate.