KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
Representing a bounding box by storing the min and max points. More...
#include <bounding_box.h>
Public Member Functions | |
Type Definitions | |
KRATOS_CLASS_POINTER_DEFINITION (BoundingBox) | |
Pointer definition of BoundingBox. More... | |
Life Cycle | |
BoundingBox () | |
Default constructor. More... | |
BoundingBox (TPointType const &MinPoint, TPointType const &MaxPoint) | |
Constructor with min and max points. More... | |
BoundingBox (const BoundingBox &Other) | |
Copy constructor. More... | |
template<typename TIteratorType > | |
BoundingBox (TIteratorType const &itPointsBegin, TIteratorType const &itPointsEnd) | |
Construction with container of points. More... | |
virtual | ~BoundingBox () |
Destructor. More... | |
Operators | |
BoundingBox & | operator= (BoundingBox const &rOther) |
Assignment operator. More... | |
Operations | |
template<typename TIteratorType > | |
void | Set (TIteratorType const &itPointsBegin, TIteratorType const &itPointsEnd) |
Sets the minimum and maximum points based on a range of input points. More... | |
template<typename TIteratorType > | |
void | Extend (TIteratorType const &itPointsBegin, TIteratorType const &itPointsEnd) |
Extends the bounding box to include a range of input points. More... | |
void | Extend (const double Margin) |
Extends the bounding box by adding a margin to its dimensions. More... | |
Access | |
TPointType & | GetMinPoint () |
Gets a reference to the minimum point. More... | |
TPointType const & | GetMinPoint () const |
Gets a constant reference to the minimum point (read-only). More... | |
TPointType & | GetMaxPoint () |
Gets a reference to the maximum point. More... | |
TPointType const & | GetMaxPoint () const |
Gets a constant reference to the maximum point (read-only). More... | |
Input and output | |
virtual std::string | Info () const |
Turn back information as a string. More... | |
virtual void | PrintInfo (std::ostream &rOStream) const |
Print information about this object. More... | |
virtual void | PrintData (std::ostream &rOStream) const |
Print object's data. More... | |
Representing a bounding box by storing the min and max points.
It stores the min and max points and have constructor for it construction with any container of points. TPointType should provide access operator [] to its coordinate and deep copy operator=
TPointType | The type of point considered |
|
inline |
Default constructor.
|
inline |
Constructor with min and max points.
|
inline |
Copy constructor.
|
inline |
Construction with container of points.
|
inlinevirtual |
Destructor.
|
inline |
Extends the bounding box by adding a margin to its dimensions.
This function extends the bounding box by adding a specified margin to each dimension of both the minimum and maximum points. It effectively enlarges the bounding box in all directions.
Margin | The margin value to be added to each dimension. |
|
inline |
Extends the bounding box to include a range of input points.
This function extends the bounding box defined by the minimum and maximum points to include a range of input points specified by the iterators itPointsBegin
and itPointsEnd
. It adjusts the minimum and maximum points as necessary to encompass all input points.
TIteratorType | The iterator type for the input points. |
itPointsBegin | The iterator pointing to the beginning of the input point range. |
itPointsEnd | The iterator pointing to the end of the input point range. |
|
inline |
Gets a reference to the maximum point.
This function returns a reference to the maximum point stored in the object.
|
inline |
Gets a constant reference to the maximum point (read-only).
This function returns a constant reference to the maximum point stored in the object. It allows you to access the maximum point without modifying it.
|
inline |
Gets a reference to the minimum point.
This function returns a reference to the minimum point stored in the object.
|
inline |
Gets a constant reference to the minimum point (read-only).
This function returns a constant reference to the minimum point stored in the object. It allows you to access the minimum point without modifying it.
|
inlinevirtual |
Turn back information as a string.
Kratos::BoundingBox< TPointType >::KRATOS_CLASS_POINTER_DEFINITION | ( | BoundingBox< TPointType > | ) |
Pointer definition of BoundingBox.
|
inline |
Assignment operator.
|
inlinevirtual |
Print object's data.
|
inlinevirtual |
Print information about this object.
|
inline |
Sets the minimum and maximum points based on a range of input points.
This function sets the minimum and maximum points of the object based on a range of input points specified by the iterators itPointsBegin
and itPointsEnd
. If the range is empty (itPointsBegin == itPointsEnd), it initializes both the minimum and maximum points to zero vectors.
TIteratorType | The iterator type for the input points. |
itPointsBegin | The iterator pointing to the beginning of the input point range. |
itPointsEnd | The iterator pointing to the end of the input point range. |