14#include "libmesh/point.h"
94 void print(std::ostream & os)
const;
108 void writeMesh(
const std::filesystem::path & path,
Oriented bounding box in 2 D or 3 D.
OrientedBoundingBox()
Default-constructs an empty box (zero dimension, no axes).
std::vector< Real > _len
length along each basis (size = _dim)
Point _minimal_corner
shared minimal corner
Real getAxisLength(unsigned int i) const
unsigned int _dim
spatial dimension (2 or 3)
std::vector< Point > _dirs
orthonormal basis vectors (size = _dim)
Point getMinimalCorner() const
bool contains(const Point &pt, const Real tolerance=libMesh::TOLERANCE) const
Test whether a point lies inside or on the box.
void writeRayAlongShortestAxis(const std::filesystem::path &ray_path, const libMesh::Parallel::Communicator &comm) const
Write a single-EDGE2 mesh representing a "ray" emanating from the box.
Point getAxisDirection(unsigned int i) const
Point getMaximalCorner() const
Point _maximal_corner
shared maximal corner
void writeMesh(const std::filesystem::path &path, const libMesh::Parallel::Communicator &comm) const
Write the oriented box as a single libMesh element to a mesh file.
Real getProjectedLength(const Point &pt, unsigned int i) const
Get the length of the projection of a point onto axis i.
void print(std::ostream &os) const
Print a summary (dimension, origin, axes).
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
static constexpr Real TOLERANCE