33 #ifndef __H__UG_shapes__
34 #define __H__UG_shapes__
41 template <
class vector_t>
59 template <
class vector_t>
62 AABox(
const vector_t& nMin,
const vector_t& nMax) :
min(nMin),
max(nMax) {}
65 AABox(
const vector_t* points,
size_t numPoints);
86 bool overlaps_line(
const vector_t& point1,
const vector_t& point2)
const;
93 template <
class vector_t>
95 out << box.
min <<
"-" << box.
max;
bool intersects(const Sphere &sphere) const
returns true if the specified sphere touches or intersects this sphere.
Definition: shapes_impl.h:47
Sphere()
Definition: shapes.h:44
vector_t center
Definition: shapes.h:54
Sphere(const vector_t &nCenter, number nRadius)
Definition: shapes.h:45
number radius
Definition: shapes.h:55
bool contains_point(const vector_t &point) const
returns true if the point lies inside or on the bounds of the rectangle
Definition: shapes_impl.h:41
std::ostream & operator<<(std::ostream &outStream, const ug::MathMatrix< 2, 2 > &m)
Definition: math_matrix.cpp:38
double number
Definition: types.h:124
AABox()
Definition: shapes.h:61
vector_t min
Definition: shapes.h:88
vector_t max
Definition: shapes.h:89
AABox(const vector_t &nMin, const vector_t &nMax)
Definition: shapes.h:62
vector_t center() const
returns the center of the box
Definition: shapes_impl.h:103
bool overlaps_line(const vector_t &point1, const vector_t &point2) const
return true if the given line (segment) and the box overlap
Definition: shapes_impl.h:126
vector_t extension() const
returns the extension (width/height/depth) of the box
Definition: shapes_impl.h:112
bool contains_point(const vector_t &point) const
returns true if the given point lies in the box or on its boundary
Definition: shapes_impl.h:120