17 #ifndef IGNITION_MATH_BOX_HH_ 18 #define IGNITION_MATH_BOX_HH_ 54 public:
Box(
double _vec1X,
double _vec1Y,
double _vec1Z,
55 double _vec2X,
double _vec2Y,
double _vec2Z);
59 public:
Box(
const Box &_b);
62 public:
virtual ~
Box();
66 public:
double XLength()
const;
70 public:
double YLength()
const;
74 public:
double ZLength()
const;
86 public:
void Merge(
const Box &_box);
91 public:
Box &operator=(
const Box &_b);
96 public:
Box operator+(
const Box &_b)
const;
101 public:
const Box &operator+=(
const Box &_b);
106 public:
bool operator==(
const Box &_b)
const;
111 public:
bool operator!=(
const Box &_b)
const;
125 _out <<
"Min[" << _b.
Min() <<
"] Max[" << _b.
Max() <<
"]";
131 public:
const Vector3d &Min()
const;
135 public:
const Vector3d &Max()
const;
150 public:
bool Intersects(
const Box &_box)
const;
155 public:
bool Contains(
const Vector3d &_p)
const;
164 const double _min,
const double _max)
const;
181 public: std::tuple<bool, double> IntersectDist(
183 const double _min,
const double _max)
const;
202 public: std::tuple<bool, double, Vector3d> Intersect(
204 const double _min,
const double _max)
const;
214 public: std::tuple<bool, double, Vector3d> Intersect(
215 const Line3d &_line)
const;
223 private:
bool ClipLine(
const int _d,
const Line3d &_line,
224 double &_low,
double &_high)
const;
const Vector3d & Max() const
Get the maximum corner.
#define IGNITION_VISIBLE
Use to represent "symbol visible" if supported.
Definition: Helpers.hh:201
Mathematical representation of a box and related functions.
Definition: Box.hh:35
friend std::ostream & operator<<(std::ostream &_out, const ignition::math::Box &_b)
Output operator.
Definition: Box.hh:122
const Vector3d & Min() const
Get the minimum corner.
Definition: BoxPrivate.hh:28
A three dimensional line segment.
Definition: Line3.hh:32
Definition: AffineException.hh:30