17 #ifndef IGNITION_MATH_BOX_HH_ 18 #define IGNITION_MATH_BOX_HH_ 25 #include <ignition/math/config.hh> 32 inline namespace IGNITION_MATH_VERSION_NAMESPACE {
39 class IGNITION_MATH_VISIBLE
Box 63 public:
Box(
double _vec1X,
double _vec1Y,
double _vec1Z,
64 double _vec2X,
double _vec2Y,
double _vec2Z);
68 public:
Box(
const Box &_b);
71 public:
virtual ~
Box();
75 public:
double XLength()
const;
79 public:
double YLength()
const;
83 public:
double ZLength()
const;
95 public:
void Merge(
const Box &_box);
100 public:
Box &operator=(
const Box &_b);
105 public:
Box operator+(
const Box &_b)
const;
110 public:
const Box &operator+=(
const Box &_b);
115 public:
bool operator==(
const Box &_b)
const;
120 public:
bool operator!=(
const Box &_b)
const;
134 _out <<
"Min[" << _b.
Min() <<
"] Max[" << _b.
Max() <<
"]";
140 public:
const Vector3d &Min()
const;
144 public:
const Vector3d &Max()
const;
159 public:
bool Intersects(
const Box &_box)
const;
164 public:
bool Contains(
const Vector3d &_p)
const;
173 const double _min,
const double _max)
const;
192 const double _min,
const double _max)
const;
213 const double _min,
const double _max)
const;
224 const Line3d &_line)
const;
232 private:
bool ClipLine(
const int _d,
const Line3d &_line,
233 double &_low,
double &_high)
const;
236 private: BoxPrivate *dataPtr;
const Vector3d & Min() const
Get the minimum corner.
const Vector3d & Max() const
Get the maximum corner.
Mathematical representation of a box and related functions.
Definition: Box.hh:39
friend std::ostream & operator<<(std::ostream &_out, const Box &_b)
Output operator.
Definition: Box.hh:131
The Vector3 class represents the generic vector containing 3 elements. Since it's commonly used to ke...
Definition: Vector3.hh:40
A three dimensional line segment. The line is defined by a start and end point.
Definition: Line3.hh:35