April 05
Prof. Ismael H. F. Santos -  ismael@tecgraf.puc-rio.br                                                          2
Cálculo das distâncias
/* =====================  Distance  ======================
**
** This function computes and returns the distance between a
** point and a plane. Normal points toward out.
*/
double Distance(double x, double y, double z, double w, int plane )
{
 switch( plane )
 {
  case 0: return( -w - x );
  case 1: return( -w + x );
  case 2: return( -w - y );
  case 3: return( -w + y );
  case 4: return( -w - z );
  case 5: return( -w + z );
 }
 return( 0.0 );
}