Commit 4d7c05a2 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Buggy iteratoration over the composite dataset. fixed that.

parent ca83ef71
...@@ -80,8 +80,6 @@ void vtkCompositePolyDataMapper2::ComputeBounds() ...@@ -80,8 +80,6 @@ void vtkCompositePolyDataMapper2::ComputeBounds()
return; return;
} }
// We do have hierarchical data - so we need to loop over
// it and get the total bounds.
vtkCompositeDataIterator* iter = input->NewIterator(); vtkCompositeDataIterator* iter = input->NewIterator();
vtkBoundingBox bbox; vtkBoundingBox bbox;
for (iter->InitTraversal(); !iter->IsDoneWithTraversal(); iter->GoToNextItem()) for (iter->InitTraversal(); !iter->IsDoneWithTraversal(); iter->GoToNextItem())
...@@ -89,14 +87,10 @@ void vtkCompositePolyDataMapper2::ComputeBounds() ...@@ -89,14 +87,10 @@ void vtkCompositePolyDataMapper2::ComputeBounds()
vtkPolyData *pd = vtkPolyData::SafeDownCast(iter->GetCurrentDataObject()); vtkPolyData *pd = vtkPolyData::SafeDownCast(iter->GetCurrentDataObject());
if (pd) if (pd)
{ {
// If this isn't the first time through, expand bounds
// we've compute so far based on the bounds of this
// block
double bounds[6]; double bounds[6];
pd->GetBounds(bounds); pd->GetBounds(bounds);
bbox.AddBounds(bounds); bbox.AddBounds(bounds);
} }
iter->GoToNextItem();
} }
iter->Delete(); iter->Delete();
bbox.GetBounds(this->Bounds); bbox.GetBounds(this->Bounds);
......
Markdown is supported
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