68#ifndef LASS_GUARDIAN_OF_INCLUSION_PRIM_AABB_2D_H
69#define LASS_GUARDIAN_OF_INCLUSION_PRIM_AABB_2D_H
93 typedef MinMaxPolicy TMinMaxPolicy;
95 typedef Point2D<T> TPoint;
97 typedef typename TPoint::TVector TVector;
99 typedef typename TPoint::TValue TValue;
100 typedef typename TPoint::TParam TParam;
101 typedef typename TPoint::TReference TReference;
102 typedef typename TPoint::TConstReference TConstReference;
103 typedef typename TPoint::TNumTraits TNumTraits;
105 enum { dimension = TPoint::dimension };
107 template <
typename U>
struct Rebind
117 const TPoint&
min()
const;
118 const TPoint&
max()
const;
140 template <
class RandomGenerator>
const TPoint
random(RandomGenerator&
random)
const;
154template <
typename T,
class MMPa,
class MMPb>
157template <
typename T,
class MMP>
160template <
typename T,
class MMP>
164const Aabb2D<T> aabb(
const Point2D<T>& point);
166template <
typename T,
class MMP>
169template <
typename T,
class MMPa,
class MMPb>
172template <
typename T,
class MMPa,
class MMPb,
class MMPr>
175template <
typename T,
class MMPa,
class MMPb>
178template <
typename T,
class MMP>
181template <
typename T,
class MMP>
184template <
typename T,
class MMPa,
class MMPb>
187template <
typename T,
class MMP>
190template <
typename T,
class MMP>
193template <
typename T,
class MMP>
194std::ostream& operator<<(std::ostream& ioOStream,
const Aabb2D<T, MMP>& aabb);
196template <
typename T,
class MMP>
199template <
typename T,
class MMP>
208#define LASS_PRIM_HAVE_PY_EXPORT_TRAITS_AABB_2D
209#ifdef LASS_GUARDIAN_OF_INCLUSION_UTIL_PYOBJECT_PLUS_H
213#ifdef LASS_GUARDIAN_OF_INCLUSION_PRIM_RAY_2D_H
217#ifdef LASS_GUARDIAN_OF_INCLUSION_PRIM_SIMPLE_POLYGON_2D_H
221#ifdef LASS_GUARDIAN_OF_INCLUSION_PRIM_TRIANGLE_2D_H
225#ifdef LASS_GUARDIAN_OF_INCLUSION_PRIM_TRANSFORMATION_2D_H
Output stream for writing a selection of geometric primitives to matlab M files.
Output stream for writing a selection of geometric primitives to XML files.
your momma's axis aligned bounding box.
Aabb2D(const TPoint &min, const TPoint &max)
Construct bounding box, spanned by min and max.
TSelf & operator+=(const Aabb2D< T, MMP2 > &other)
Expand bounding box so it contains the other bounding box.
const TPoint & min() const
TSelf & operator=(const Aabb2D< T, MMP2 > &other)
assign one bounding box to another.
void clear()
set AABB to an empty box
TSelf & operator+=(const TPoint &point)
Expand bounding box so it contains point.
Aabb2D(const TPoint &point)
Construct bounding box around a single point (min == max)
bool isValid() const
internal check to see if AABB is valid.
const TValue perimeter() const
Returns perimeter of bounding box.
void setMin(const TPoint &min)
set corner with smallest component values
bool intersects(const Aabb2D< T, MMP2 > &other) const
Check if two axis-aligned bounding boxes do intersect.
bool isEmpty() const
Return true if bounding box contains no points.
bool collides(const Aabb2D< T, MMP2 > &other) const
Check if two axis-aligned bounding boxes do dollide.
const TPointH center() const
Return the center point of the bounding box.
const TValue area() const
Returns area of bounding box.
const TVector size() const
Return size of bounding box per axis, max - min.
void grow(TParam iDistance)
Expand bounding box by distance iDistance.
const TPoint random(RandomGenerator &random) const
Return a random point so that bounding box contains it.
void swap(Aabb2D< T, MMP2 > &other)
swap two bounding boxes.
Side classify(const TPoint &point) const
Classify if a point is in or outside the bounding box, or on its surface.
bool contains(const TPoint &point) const
Returns true if point is inside bounding box or on its surface.
void scale(TParam iScale)
Scale bounding box by scale iScale.
Aabb2D()
Construct an empty bounding box.
const TPoint & max() const
Aabb2D(const Aabb2D< T, MMP2 > &other)
copy constructor.
bool contains(const Aabb2D< T, MMP2 > &other) const
Returns true if the AABB other is inside (or on its surface) this AABB.
void setMax(const TPoint &max)
set corner with larges component values
#define LASS_SIMD_ALIGN
if LASS_SIMD_ALIGNMENT is set, use LASS_SIMD_ALIGN to align some structures on SIMD alignment boundar...
set of geometrical primitives
Side
Different sides of a surface.
Result
meta information on the result you have from an operation like an intersection ...
Library for Assembled Shared Sources.
MinMaxPolicy enforcing strict rules for the minima and maxima.