- aCollection->InitTraversal();
- while (vtkActor* aProp = aCollection->GetNextActor()) {
- // if it's invisible, or has no geometry, we can skip the rest
+ return ComputeBounds( aCollection, theBounds );
+}
+
+/*! Compute the bounds of actors*/
+int
+ComputeBounds(vtkActorCollection* theCollection, double theBounds[6])
+{
+ int aCount = 0;
+
+ theBounds[0] = theBounds[2] = theBounds[4] = VTK_FLOAT_MAX;
+ theBounds[1] = theBounds[3] = theBounds[5] = -VTK_FLOAT_MAX;
+
+ // loop through all props
+ theCollection->InitTraversal();
+ while (vtkActor* aProp = theCollection->GetNextActor()) {
+ // if it's invisible, or has no geometry, we can skip the rest