[vtk-developers] Tests failing on Borland builds

dean.inglis at camris.ca dean.inglis at camris.ca
Mon Dec 8 16:38:30 EST 2003


I like Sebastien's static methods idea.  Would it 
be sensible to recognize the state of initialized to 
be a positive volume and unitialized as a negative volume, 
avoiding VTK_DOUBLE_MAX or VTK_FLOAT_MAX altogether?
e.g., 

void vtkMath::UnitializeBounds(double bounds[6]){
  bounds[0] = 1.0;
  bounds[1] = -1.0;
  bounds[2] = 1.0;
  bounds[3] = -1.0;
  bounds[4] = 1.0;
  bounds[5] = -1.0;
}

void vtkMath::AreBoundsInitialized(double bounds[6]){
  double diff,vol = 1.0;
  for(int i=0;i<3;i++)
   {
   diff = bounds[2*i+1]-bounds[2*i];
   if(diff != 0.0) {vol *= diff;}
   }
  return ((vol<0.0)?0:1);
}

Dean




More information about the vtk-developers mailing list