COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
BoundingBox.hpp
Go to the documentation of this file.
1 // Copyright (C) 2010-2013 von Karman Institute for Fluid Dynamics, Belgium
2 //
3 // This software is distributed under the terms of the
4 // GNU Lesser General Public License version 3 (LGPLv3).
5 // See doc/lgpl.txt and doc/gpl.txt for the license text.
6 
7 #ifndef cf3_math_BoundingBox_hpp
8 #define cf3_math_BoundingBox_hpp
9 
11 
12 #include "math/MatrixTypes.hpp"
13 #include "math/LibMath.hpp"
14 
16 
17 namespace cf3 {
18 namespace math {
19 
21 
25 {
26 public: // functions
27 
29  static std::string type_name() { return "BoundingBox"; }
30 
31  BoundingBox();
32 
34  BoundingBox(const RealVector& min, const RealVector& max);
35 
37  BoundingBox(const std::vector<Real>& min, const std::vector<Real>& max);
38 
40  void define(const BoundingBox& other);
41 
43  void define(const RealVector& min, const RealVector& max);
44 
46  void define(const std::vector<Real>& min, const std::vector<Real>& max);
47 
49  void extend(const RealVector& point);
50 
53  void make_global();
54 
55 public: // functions
56 
58  bool contains(const RealVector& coordinate) const;
59 
61  const RealVector& min() const { return m_bounding_min; }
62 
64  const RealVector& max() const { return m_bounding_max; }
65 
67  RealVector& min() { return m_bounding_min; }
68 
70  RealVector& max() { return m_bounding_max; }
71 
73  Uint dim() const { return m_bounding_min.size(); }
74 
75 private: // data
76 
79 
80 }; // end BoundingBox
81 
83 
84 } // math
85 } // cf3
86 
88 
89 #endif // cf3_math_BoundingBox_hpp
const RealVector & min() const
minimum coordinates, defining one corner of the bounding box
Definition: BoundingBox.hpp:61
const RealVector & max() const
maximum coordinates, defining one corner of the bounding box
Definition: BoundingBox.hpp:64
RealVector m_bounding_max
maximum coordinates
Definition: BoundingBox.hpp:78
RealVector & min()
minimum coordinates, defining one corner of the bounding box
Definition: BoundingBox.hpp:67
Real max(const Real a, const Real b)
Maximum between two scalars.
Definition: Terminals.hpp:228
RealVector & max()
maximum coordinates, defining one corner of the bounding box
Definition: BoundingBox.hpp:70
Real min(const Real a, const Real b)
Minimum between two scalars.
Definition: Terminals.hpp:234
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealVector
Dynamic sized column vector.
Definition: MatrixTypes.hpp:25
Top-level namespace for coolfluid.
Definition: Action.cpp:18
#define Math_API
Definition: LibMath.hpp:24
RealVector m_bounding_min
minimum coordinates
Definition: BoundingBox.hpp:77
static std::string type_name()
Gets the Class name.
Definition: BoundingBox.hpp:29
unsigned int Uint
typedef for unsigned int
Definition: CF.hpp:90
Bounding box defined by minimum and maximum coordinates.
Definition: BoundingBox.hpp:24
Uint dim() const
dimension of the bounding box
Definition: BoundingBox.hpp:73
Send comments to:
COOLFluiD Web Admin