G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsAABB.h
Go to the documentation of this file.
1
15# pragma once
16
17namespace gismo {
18
29template<short_t d, class Z = index_t>
30struct gsAABB
31{
32public:
33 typedef gsVector<Z, d> point;
34
35 gsAABB(const point & low, const point & upp, index_t lvl)
36 :
37 first(low), second(upp), level(lvl)
38 { }
39
40 gsAABB(const point & low, const point & upp)
41 :
42 gsAABB(low, upp, -1)
43 { }
44
45 gsAABB(const point & upp)
46 :
47 second(upp), level(-1)
48 {
49 first.setZero();
50 }
51
52 gsAABB()
53 :
54 level(-1)
55 {
56 first.setZero();
57 second.setZero();
58 }
59
61 gsAABB( const gsAABB<d,Z>& other )
62 {
63 operator=(other);
64 }
65
68 {
69 operator=(give(other));
70 }
71
74 {
75 if (this!=&other)
76 {
77 first = other.first;
78 second = other.second;
79 level = other.level;
80 }
81 return *this;
82 }
83
86 {
87 first = give(other.first);
88 second = give(other.second);
89 level = give(other.level);
90 return *this;
91 }
92
93public:
94
95 point first;
96 point second;
97
100
101 // see http://eigen.tuxfamily.org/dox-devel/group__TopicStructHavingEigenMembers.html
102# define Eigen gsEigen
103 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
104# undef Eigen
105};
106
107} // namespace gismo
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition gsVector.h:37
#define index_t
Definition gsConfig.h:32
The G+Smo namespace, containing all definitions for the library.
S give(S &x)
Definition gsMemory.h:266
Struct of for an Axis-aligned bounding box.
Definition gsAABB.h:31
gsAABB< d, Z > & operator=(const gsAABB< d, Z > &other)
Assignment operator.
Definition gsAABB.h:73
index_t level
Level in which the box lives.
Definition gsAABB.h:99
gsAABB(gsAABB< d, Z > &&other)
Move constructor.
Definition gsAABB.h:67
gsAABB(const gsAABB< d, Z > &other)
Copy constructor (makes deep copy)
Definition gsAABB.h:61