src/cdtGen.cpp
/*! \fn bool CDTGenerator::rayIntersectsPLCFacet(CGALRay randomRay, LCC::Dart_handle fHandle)
 *  \brief Tests whether input ray intersects the PLC facet. 
 *  \param [in] randomRay Random ray 
 *  \param [in] fHandle Dart handle to the facet. 
 *  \return True if input ray intersects the facet of PLC.
 */
\fn bool CDTGenerator::rayIntersectsPLCFacet(CGALRay randomRay, LCC::Dart_handle fHandle)
\brief Tests whether input ray intersects the PLC facet.
\param [in] randomRay Random ray
\param [in] fHandle Dart handle to the facet.
\return True if input ray intersects the facet of PLC.
\ fn bool CDTGenerator :: rayIntersectsPLCFacet ( CGALRay randomRay LCC :: Dart_handle fHandle ) \ brief Tests whether input ray intersects the PLC facet . \ param [ in ] randomRay Random ray \ param [ in ] fHandle Dart handle to the facet . \ return True if input ray intersects the facet of PLC .
void CDTGenerator::countRayPLCFacetIntersections(CGALRay &randomRay, LCC::Dart_handle &fHandle, size_t &nIntersections)
{
	CGALPoint p[4];
	size_t i = 0;
	for (LCC::One_dart_per_incident_cell_range<0, 2>::iterator pIter = plc.one_dart_per_incident_cell<0, 2>(fHandle).begin(), pIterEnd = plc.one_dart_per_incident_cell<0, 2>(fHandle).end(); pIter != pIterEnd; pIter++)
		p[i++] = plc.point(pIter);
	CGALTriangle triangle;
	bool result;
	triangle = CGALTriangle(p[0], p[1], p[2]);
	if (triangle.is_degenerate())
	{
		cout << "Degenerate triangle 1...discarding!!" << endl;
	}
	else
	{
		if (do_intersect(randomRay, triangle)) 
		{
			nIntersections++;
		}
	}
	if (i == 4) 
	{
		triangle = CGALTriangle(p[0], p[2], p[3]);
		if (triangle.is_degenerate())
		{
			cout << "Degenerate triangle 2...discarding!!" << endl;
		}
		else
		{
			if (do_intersect(randomRay, triangle))
			{
				nIntersections++;			
			}
		}
	}
}
void CDTGenerator :: countRayPLCFacetIntersections ( CGALRay & randomRay , LCC :: Dart_handle & fHandle , size_t & nIntersections ) { CGALPoint p [ 4 ] ; size_t i = 0 ; for ( LCC :: One_dart_per_incident_cell_range < 0 , 2 > :: iterator pIter = plc . one_dart_per_incident_cell < 0 , 2 > ( fHandle ) . begin ( ) , pIterEnd = plc . one_dart_per_incident_cell < 0 , 2 > ( fHandle ) . end ( ) ; pIter != pIterEnd ; pIter ++ ) p [ i ++ ] = plc . point ( pIter ) ; CGALTriangle triangle ; bool result ; triangle = CGALTriangle ( p [ 0 ] , p [ 1 ] , p [ 2 ] ) ; if ( triangle . is_degenerate ( ) ) { cout << " " << endl ; } else { if ( do_intersect ( randomRay , triangle ) ) { nIntersections ++ ; } } if ( i == 4 ) { triangle = CGALTriangle ( p [ 0 ] , p [ 2 ] , p [ 3 ] ) ; if ( triangle . is_degenerate ( ) ) { cout << " " << endl ; } else { if ( do_intersect ( randomRay , triangle ) ) { nIntersections ++ ; } } } }
\fn bool CDTGenerator::rayIntersectsPLCFacet(CGALRay randomRay, LCC::Dart_handle fHandle)
  \brief Tests whether input ray intersects the PLC facet.
\ fn bool CDTGenerator :: rayIntersectsPLCFacet ( CGALRay randomRay LCC :: Dart_handle fHandle ) \ brief Tests whether input ray intersects the PLC facet .
// represent facet in triangle_3 form  //		cout << "Valid ray-triangle intersection!!" << endl;  // facet has 2 triangles //			cout << "Valid ray-triangle intersection!!" << endl;