src/cdtGen.cpp
/*! \fn bool CDTGenerator::hasDegeneracyWithNeighbor(Delaunay::Cell_handle cHandle)
    \brief Tests whether input cell has any neighbor with which it forms cosphericality.
    \param [in] cHandle Handle to cell to be tested.
    \param [out] If there is a neighbor having degenerate condition with cHandle then it is returned here.
    \return True if cHandle has degenerate condition with a neighbor cell.    
*/
\fn bool CDTGenerator::hasDegeneracyWithNeighbor(Delaunay::Cell_handle cHandle)
\brief Tests whether input cell has any neighbor with which it forms cosphericality.
\param [in] cHandle Handle to cell to be tested.
\param [out] If there is a neighbor having degenerate condition with cHandle then it is returned here.
\return True if cHandle has degenerate condition with a neighbor cell.
\ fn bool CDTGenerator :: hasDegeneracyWithNeighbor ( Delaunay :: Cell_handle cHandle ) \ brief Tests whether input cell has any neighbor with which it forms cosphericality . \ param [ in ] cHandle Handle to cell to be tested . \ param [ out ] If there is a neighbor having degenerate condition with cHandle then it is returned here . \ return True if cHandle has degenerate condition with a neighbor cell .
bool CDTGenerator::hasDegeneracyWithNeighbor(Delaunay::Cell_handle cHandle, size_t degenPartnerID)
{
	for (size_t neighborID = 0; neighborID < 4; neighborID++)
	{
		Delaunay::Cell_handle neighbor = cHandle->neighbor(neighborID);
		CGALPoint p[5];
		for (size_t i = 0, k = 0; i < 4; i++)
			p[k++] = cHandle->vertex(i)->point();
		p[4] = (neighbor->vertex(DT.mirror_index(cHandle, neighborID)))->point(); 
		if (side_of_bounded_sphere(p[0], p[1], p[2], p[3], p[4]) == ON_BOUNDARY)
		{
			degenPartnerID = neighborID;
			return true;
		}
		else
       			continue;
	}
	return false;       
}
bool CDTGenerator :: hasDegeneracyWithNeighbor ( Delaunay :: Cell_handle cHandle , size_t degenPartnerID ) { for ( size_t neighborID = 0 ; neighborID < 4 ; neighborID ++ ) { Delaunay :: Cell_handle neighbor = cHandle -> neighbor ( neighborID ) ; CGALPoint p [ 5 ] ; for ( size_t i = 0 , k = 0 ; i < 4 ; i ++ ) p [ k ++ ] = cHandle -> vertex ( i ) -> point ( ) ; p [ 4 ] = ( neighbor -> vertex ( DT . mirror_index ( cHandle , neighborID ) ) ) -> point ( ) ; if ( side_of_bounded_sphere ( p [ 0 ] , p [ 1 ] , p [ 2 ] , p [ 3 ] , p [ 4 ] ) == ON_BOUNDARY ) { degenPartnerID = neighborID ; return true ; } else continue ; } return false ; }
\fn bool CDTGenerator::hasDegeneracyWithNeighbor(Delaunay::Cell_handle cHandle)
\brief Tests whether input cell has any neighbor with which it forms cosphericality.
\ fn bool CDTGenerator :: hasDegeneracyWithNeighbor ( Delaunay :: Cell_handle cHandle ) \ brief Tests whether input cell has any neighbor with which it forms cosphericality .
// initialize all other vertices of the 5-point set // the vertex opposite to cHandle in neighbor.