3#include <fmt/ostream.h>
45 explicit BoundingBox(Eigen::VectorXd boundMin, Eigen::VectorXd boundMax);
75 void scaleBy(
double safetyFactor);
89 Eigen::VectorXd
center()
const;
138struct fmt::formatter<
precice::mesh::BoundingBox> : ostream_formatter {
This class provides a lightweight logger.
An axis-aligned bounding box around a (partition of a) mesh.
BoundingBox & operator=(const BoundingBox &bb)=default
bool contains(const Vertex &vertex) const
Checks if vertex in contained in _bb.
Eigen::VectorXd maxCorner() const
the max corner of the bounding box
void print(std::ostream &out) const
Print bounds of bounding box, output operator overload.
Eigen::VectorXd minCorner() const
the min corner of the bounding box
BoundingBox(BoundingBox &&)=default
bool empty() const
Check if every dimension's length is equal to zero.
double longestEdgeLength() const
returns the maximum length of the bounding box in any dimension
Eigen::VectorXd _boundMax
static logging::Logger _log
double getArea(std::vector< bool > deadAxis)
Calculate the area of bounding box.
void expandBy(const BoundingBox &otherBB)
Expand bounding box using another bounding box.
BoundingBox(int dimension)
BoundingBox(const BoundingBox &)=default
Special Members.
const std::vector< double > dataVector() const
Return data as std::vector.
bool overlapping(const BoundingBox &otherBB) const
Checks whether two bounding boxes are overlapping.
Eigen::VectorXd _boundMin
bool operator==(const BoundingBox &otherBB) const
Comparison Operator.
int getDimension() const
Getter dimension of the bounding box.
int _dimensions
Number of dimensions (2 or 3)
void scaleBy(double safetyFactor)
Increase the size of bounding box by safety margin.
Eigen::VectorXd center() const
Returns the Center Of Gravity of the mesh.
BoundingBox & operator=(BoundingBox &&bb)=default
double getEdgeLength(int axis) const
returns the edge length of a specific axis
std::ostream & operator<<(std::ostream &os, const BoundingBox &bb)
Main namespace of the precice library.