|
||||
File indexing completed on 2025-01-18 10:03:03
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 0028 //! Converts the given Bnd_Box2d to BVH_Box 0029 static BVH_Box <Standard_Real, 2> Bnd2BVH (const Bnd_Box2d& theBox) 0030 { 0031 Standard_Real aXMin, aYMin, aXMax, aYMax; 0032 theBox.Get (aXMin, aYMin, aXMax, aYMax); 0033 return BVH_Box <Standard_Real, 2> (BVH_Vec2d (aXMin, aYMin), 0034 BVH_Vec2d (aXMax, aYMax)); 0035 } 0036 0037 //! Converts the given Bnd_Box to BVH_Box 0038 static BVH_Box <Standard_Real, 3> Bnd2BVH (const Bnd_Box& theBox) 0039 { 0040 Standard_Real aXMin, aYMin, aZMin, aXMax, aYMax, aZMax; 0041 theBox.Get (aXMin, aYMin, aZMin, aXMax, aYMax, aZMax); 0042 return BVH_Box <Standard_Real, 3> (BVH_Vec3d (aXMin, aYMin, aZMin), 0043 BVH_Vec3d (aXMax, aYMax, aZMax)); 0044 } 0045 }; 0046 0047 #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 |