|
|
|||
File indexing completed on 2026-10-04 09:13:39
0001 // Created by: Eugeny MALTCHIKOV 0002 // Created on: 2019-04-17 0003 // Copyright (c) 2019 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef _Bnd_Tools_Header 0017 #define _Bnd_Tools_Header 0018 0019 #include <Bnd_Box2d.hxx> 0020 #include <Bnd_Box.hxx> 0021 #include <BVH_Box.hxx> 0022 0023 //! Defines a set of static methods operating with bounding boxes 0024 class Bnd_Tools 0025 { 0026 public: //! @name Bnd_Box to BVH_Box conversion 0027 //! Converts the given Bnd_Box2d to BVH_Box 0028 static BVH_Box<double, 2> Bnd2BVH(const Bnd_Box2d& theBox) 0029 { 0030 double aXMin, aYMin, aXMax, aYMax; 0031 theBox.Get(aXMin, aYMin, aXMax, aYMax); 0032 return BVH_Box<double, 2>(BVH_Vec2d(aXMin, aYMin), BVH_Vec2d(aXMax, aYMax)); 0033 } 0034 0035 //! Converts the given Bnd_Box to BVH_Box 0036 static BVH_Box<double, 3> Bnd2BVH(const Bnd_Box& theBox) 0037 { 0038 double aXMin, aYMin, aZMin, aXMax, aYMax, aZMax; 0039 theBox.Get(aXMin, aYMin, aZMin, aXMax, aYMax, aZMax); 0040 return BVH_Box<double, 3>(BVH_Vec3d(aXMin, aYMin, aZMin), BVH_Vec3d(aXMax, aYMax, aZMax)); 0041 } 0042 }; 0043 0044 #endif // _Bnd_Tools_Header
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|