title: How to get the bounds of two combined vtkPolyData surfaces?
body: <p>My VTK program draws a vtkPolyData object <code>surface1</code> in a coordinate system using a <code>vtkCubeAxesActor</code>. I position the cube axes in the following way:</p>
  
  <pre><code>cubeAxesActor-&gt;SetBounds( surface1-&gt;GetBounds() );
  </code></pre>
  
  <p>I recently added another vtkPolyData object, <code>surface2</code>. Is there a good way to calculate the "total" bounds for the two surfaces?</p>
  
  <p>I know that I could do something like this:</p>
  
  <pre><code>float *bounds1 = surface1-&gt;GetBounds();
  float *bounds2 = surface2-&gt;GetBounds();
  float *bounds_total;
  bounds_total[0] = min( bounds1[0], bounds2[0] );
  bounds_total[1] = max( bounds1[1], bounds2[1] );
  bounds_total[2] = min( bounds1[2], bounds2[2] );
  // ...
  </code></pre>
  
  <p>But I suppose there is a better way using VTK built-ins?</p>