[vtkusers] vtkBoundingBox GetCenter Error?

Lim, Theodore T.Lim at hw.ac.uk
Fri Jul 13 05:16:57 EDT 2007


Hi,
 
I think there might be an error in vtkBoundingBox GetCenter().
 
// Original
inline void vtkBoundingBox::GetCenter(double center[3]) const
{
  center[0] = 0.5 * this->MaxPnt[0] + this->MinPnt[0];
  center[1] = 0.5 * this->MaxPnt[1] + this->MinPnt[1];
  center[2] = 0.5 * this->MaxPnt[2] + this->MinPnt[2];
}
 
// My change
inline void vtkBoundingBox::GetCenter(double center[3]) const
{
  center[0] = 0.5 * ( this->MaxPnt[0] + this->MinPnt[0] );
  center[1] = 0.5 * ( this->MaxPnt[1] + this->MinPnt[1] );
  center[2] = 0.5 * ( this->MaxPnt[2] + this->MinPnt[2] );
}
 
Cheers,
Theo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070713/e6300c7f/attachment.htm>


More information about the vtkusers mailing list