|
||||
File indexing completed on 2025-01-18 10:05:55
0001 //----------------------------------*-C++-*----------------------------------// 0002 // Copyright 2022-2024 UT-Battelle, LLC, and other Celeritas developers. 0003 // See the top-level COPYRIGHT file for details. 0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT) 0005 //---------------------------------------------------------------------------// 0006 //! \file orange/detail/BIHUtils.hh 0007 //---------------------------------------------------------------------------// 0008 #pragma once 0009 0010 #include <vector> 0011 0012 #include "../BoundingBoxUtils.hh" 0013 #include "../OrangeTypes.hh" 0014 0015 namespace celeritas 0016 { 0017 //---------------------------------------------------------------------------// 0018 /*! 0019 * Calculate bounding box enclosing bounding boxes for specified indices. 0020 */ 0021 inline FastBBox calc_union(std::vector<FastBBox> const& bboxes, 0022 std::vector<LocalVolumeId> const& indices) 0023 { 0024 FastBBox result; 0025 for (auto const& id : indices) 0026 { 0027 CELER_ASSERT(id < bboxes.size()); 0028 result = calc_union(result, bboxes[id.unchecked_get()]); 0029 } 0030 0031 return result; 0032 } 0033 //---------------------------------------------------------------------------// 0034 } // namespace celeritas
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |