IO/Cesium3DTiles/TreeInformation.cxx
//------------------------------------------------------------------------------
/**
 * Compute the tight bounding box around all buildings in a tile.
 * 'list', which stores all buildings in a tile as indexes into 'buildings' vector
 * which stores all buildings.
 */
Compute the tight bounding box around all buildings in a tile.
'list', which stores all buildings in a tile as indexes into 'buildings' vector
which stores all buildings.
Compute the tight bounding box around all buildings in a tile . ' list ' which stores all buildings in a tile as indexes into ' buildings ' vector which stores all buildings .
std::array<double, 6> ComputeTightBoudingBox(
  const std::vector<vtkSmartPointer<vtkCompositeDataSet>>& buildings, vtkIdList* tileBuildings)
{
  std::array<double, 6> wholeBB = { std::numeric_limits<double>::max(),
    std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max(),
    std::numeric_limits<double>::lowest(), std::numeric_limits<double>::max(),
    std::numeric_limits<double>::lowest() };
  for (int i = 0; i < tileBuildings->GetNumberOfIds(); ++i)
  {
    double bb[6];
    buildings[tileBuildings->GetId(i)]->GetBounds(bb);
    wholeBB = TreeInformation::ExpandBounds(&wholeBB[0], bb);
  }
  return wholeBB;
}
std :: array < double , 6 > ComputeTightBoudingBox ( const std :: vector < vtkSmartPointer < vtkCompositeDataSet > > & buildings , vtkIdList * tileBuildings ) { std :: array < double , 6 > wholeBB = { std :: numeric_limits < double > :: max ( ) , std :: numeric_limits < double > :: lowest ( ) , std :: numeric_limits < double > :: max ( ) , std :: numeric_limits < double > :: lowest ( ) , std :: numeric_limits < double > :: max ( ) , std :: numeric_limits < double > :: lowest ( ) } ; for ( int i = 0 ; i < tileBuildings -> GetNumberOfIds ( ) ; ++ i ) { double bb [ 6 ] ; buildings [ tileBuildings -> GetId ( i ) ] -> GetBounds ( bb ) ; wholeBB = TreeInformation :: ExpandBounds ( & wholeBB [ 0 ] , bb ) ; } return wholeBB ; }
Compute the tight bounding box around all buildings in a tile.
Compute the tight bounding box around all buildings in a tile .