Commit 3e5dea94 authored by Dave Partyka's avatar Dave Partyka Committed by Kitware Robot
Browse files

Merge topic '0012598-unroll-calculate-bounds' into pv-master

a9f07bef Fixed unused variable warning.
6c314a22 Unrolled loops in vtkPoints::CalculateBounds.
parents 654a46cd a9f07bef
......@@ -91,7 +91,6 @@ void vtkPoints::GetPoints(vtkIdList *ptIds, vtkPoints *fp)
void vtkPoints::ComputeBounds()
{
vtkIdType i;
int j;
double *x;
if ( this->GetMTime() > this->ComputeTime )
......@@ -101,17 +100,12 @@ void vtkPoints::ComputeBounds()
for (i=0; i<this->GetNumberOfPoints(); i++)
{
x = this->GetPoint(i);
for (j=0; j<3; j++)
{
if ( x[j] < this->Bounds[2*j] )
{
this->Bounds[2*j] = x[j];
}
if ( x[j] > this->Bounds[2*j+1] )
{
this->Bounds[2*j+1] = x[j];
}
}
this->Bounds[0] = x[0] < this->Bounds[0] ? x[0] : this->Bounds[0];
this->Bounds[1] = x[0] > this->Bounds[1] ? x[0] : this->Bounds[1];
this->Bounds[2] = x[1] < this->Bounds[2] ? x[1] : this->Bounds[2];
this->Bounds[3] = x[1] > this->Bounds[3] ? x[1] : this->Bounds[3];
this->Bounds[4] = x[2] < this->Bounds[4] ? x[2] : this->Bounds[4];
this->Bounds[5] = x[2] > this->Bounds[5] ? x[2] : this->Bounds[5];
}
this->ComputeTime.Modified();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment