6 #include "value_range.hpp" 7 #include "point_3d.hpp" 26 Cuboid() noexcept =
default;
38 : data_({ xRange, yRange, zRange })
117 return data_[0].Contains(point[0])
118 && data_[1].Contains(point[1])
119 && data_[2].Contains(point[2]);
131 return other.data_[0].IntersectsWith(data_[0])
132 && other.data_[1].IntersectsWith(data_[1])
133 && other.data_[2].IntersectsWith(data_[2]);
144 return data_ == cuboid.data_;
155 return !(*
this == cuboid);
bool IntersectsWith(Cuboid other) const noexcept
Check if this cuboid intersects with another cuboid.
Definition: cuboid.hpp:129
3D rectangle in the X, Y and Z domain.
Definition: cuboid.hpp:18
Cuboid() noexcept=default
Creates a default cuboid with value ranges from 0.0 to 0.0.
Root namespace for the Image Manager interface.
Definition: version.hpp:11
bool Contains(Point3D< double > point) const noexcept
Check if a point is inside the cuboid.
Definition: cuboid.hpp:115
ValueRange< double > XRange() const noexcept
Get the range regarding the x-axis.
Definition: cuboid.hpp:49
void SetXRange(ValueRange< double > xRange) noexcept
Set the range regarding the x-axis.
Definition: cuboid.hpp:60
void SetYRange(ValueRange< double > yRange) noexcept
Set the range regarding the y-axis.
Definition: cuboid.hpp:80
bool operator==(const Cuboid &cuboid) const noexcept
Compares to an other cuboid.
Definition: cuboid.hpp:142
Cuboid(ValueRange< double > xRange, ValueRange< double > yRange, ValueRange< double > zRange)
Initialize a cuboid object.
Definition: cuboid.hpp:37
void SetZRange(ValueRange< double > zRange) noexcept
Set the range regarding the z-axis.
Definition: cuboid.hpp:101
ValueRange< double > YRange() const noexcept
Get the range regarding the y-axis.
Definition: cuboid.hpp:70
ValueRange< double > ZRange() const noexcept
Get the range regarding the z-axis.
Definition: cuboid.hpp:90
bool operator!=(const Cuboid &cuboid) const noexcept
Compares to an other cuboid.
Definition: cuboid.hpp:153