CVB++ 14.1
Cuboid Class Referencefinal

3D rectangle in the X, Y and Z domain. More...

#include <cvb/cuboid.hpp>

Public Member Functions

 Cuboid () noexcept=default
 Creates a default cuboid with value ranges from 0.0 to 0.0. More...
 
 Cuboid (ValueRange< double > xRange, ValueRange< double > yRange, ValueRange< double > zRange)
 Initialize a cuboid object. More...
 
ValueRange< double > XRange () const noexcept
 Get the range regarding the x-axis. More...
 
void SetXRange (ValueRange< double > xRange) noexcept
 Set the range regarding the x-axis. More...
 
ValueRange< double > YRange () const noexcept
 Get the range regarding the y-axis. More...
 
void SetYRange (ValueRange< double > yRange) noexcept
 Set the range regarding the y-axis. More...
 
ValueRange< double > ZRange () const noexcept
 Get the range regarding the z-axis. More...
 
void SetZRange (ValueRange< double > zRange) noexcept
 Set the range regarding the z-axis. More...
 
bool Contains (Point3D< double > point) const noexcept
 Check if a point is inside the cuboid. More...
 
bool IntersectsWith (Cuboid other) const noexcept
 Check if this cuboid intersects with another cuboid. More...
 
bool operator== (const Cuboid &cuboid) const noexcept
 Compares to an other cuboid. More...
 
bool operator!= (const Cuboid &cuboid) const noexcept
 Compares to an other cuboid. More...
 

Detailed Description

3D rectangle in the X, Y and Z domain.

Region resembling a cube with its faces having not necessarily equal sizes.

Constructor & Destructor Documentation

◆ Cuboid() [1/2]

Cuboid ( )
defaultnoexcept

Creates a default cuboid with value ranges from 0.0 to 0.0.

Exceptions
Doesnot throw any exception.

◆ Cuboid() [2/2]

Cuboid ( ValueRange< double >  xRange,
ValueRange< double >  yRange,
ValueRange< double >  zRange 
)
inline

Initialize a cuboid object.

Parameters
[in]xRangeRange regarding the x-axis.
[in]yRangeRange regarding the y-axis.
[in]zRangeRange regarding the z-axis.
Exceptions
Anyexception derived from std::exception including CvbException.

Member Function Documentation

◆ Contains()

bool Contains ( Point3D< double >  point) const
inlinenoexcept

Check if a point is inside the cuboid.

Parameters
[in]pointPoint to be checked.
Returns
True if the value is within the cuboid, false otherwise.
Exceptions
Doesnot throw any exception.

◆ IntersectsWith()

bool IntersectsWith ( Cuboid  other) const
inlinenoexcept

Check if this cuboid intersects with another cuboid.

Parameters
[in]otherCuboid for intersection test.
Returns
True if this cuboid and the other cuboid have at least one 3D point in common, false otherwise.
Exceptions
Doesnot throw any exception.

◆ operator!=()

bool operator!= ( const Cuboid cuboid) const
inlinenoexcept

Compares to an other cuboid.

Parameters
[in]cuboidOther cuboid.
Returns
True if not equal, otherwise false.
Exceptions
Doesnot throw any exception.

◆ operator==()

bool operator== ( const Cuboid cuboid) const
inlinenoexcept

Compares to an other cuboid.

Parameters
[in]cuboidOther cuboid.
Returns
True if equal, otherwise false.
Exceptions
Doesnot throw any exception.

◆ SetXRange()

void SetXRange ( ValueRange< double >  xRange)
inlinenoexcept

Set the range regarding the x-axis.

Parameters
[in]xRangeThe new range.
Exceptions
Doesnot throw any exception.

◆ SetYRange()

void SetYRange ( ValueRange< double >  yRange)
inlinenoexcept

Set the range regarding the y-axis.

Parameters
[in]yRangeThe new range.
Exceptions
Doesnot throw any exception.

◆ SetZRange()

void SetZRange ( ValueRange< double >  zRange)
inlinenoexcept

Set the range regarding the z-axis.

Parameters
[in]zRangeThe new range.
Exceptions
Doesnot throw any exception.
Examples
Cvb/CppPointCloudCreateCalibrated.

◆ XRange()

ValueRange< double > XRange ( ) const
inlinenoexcept

Get the range regarding the x-axis.

Returns
The range.
Exceptions
Doesnot throw any exception.

◆ YRange()

ValueRange< double > YRange ( ) const
inlinenoexcept

Get the range regarding the y-axis.

Returns
The range.
Exceptions
Doesnot throw any exception.

◆ ZRange()

ValueRange< double > ZRange ( ) const
inlinenoexcept

Get the range regarding the z-axis.

Returns
The range.
Exceptions
Doesnot throw any exception.