13#ifndef INCLUDE_AABBTREE_HH
14#define INCLUDE_AABBTREE_HH
34#include <Eigen/Geometry>
38#define AABBTREE_ERROR(MSG) { \
39 std::ostringstream os; os << MSG; \
40 throw std::runtime_error(os.str()); \
45#ifndef AABBTREE_ASSERT
46#define AABBTREE_ASSERT(COND, MSG) if (!(COND)) { AABBTREE_ERROR(MSG); }
50#ifndef AABBTREE_WARNING
51#define AABBTREE_WARNING(MSG) { std::cout << MSG << '\n' }
55#ifndef AABBTREE_ASSERT_WARNING
56#define AABBTREE_ASSERT_WARNING(COND, MSG) if (!(COND)) { AABBTREE_WARNING(MSG); }
60#ifndef AABBTREE_DEFAULT_INTEGER_TYPE
61#define AABBTREE_DEFAULT_INTEGER_TYPE int
79 static_assert(std::is_integral<Integer>::value,
"AABBTREE_DEFAULT_INTEGER_TYPE must be an integral type.");
87 template <
typename Real, Integer N>
class Box;
88 template <
typename Real, Integer N>
using BoxUniquePtr = std::unique_ptr<Box<Real, N>>;
89 template <
typename Real, Integer N>
using BoxUniquePtrList = std::vector<BoxUniquePtr<Real, N>>;
90 template <
typename Real, Integer N>
using Vector = Eigen::Vector<Real, N>;
91 template <
typename Real, Integer N>
using Point = Eigen::Vector<Real, N>;
#define AABBTREE_DEFAULT_INTEGER_TYPE
Definition AABBtree.hh:61
A class representing an axis-aligned bounding box (AABB) in N-dimensional space.
Definition Box.hxx:49
Namespace for the AABBtree library.
Definition AABBtree.hh:70
std::basic_ostream< char > OutStream
Definition AABBtree.hh:84
Eigen::Vector< Real, N > Point
Definition AABBtree.hh:91
std::map< Integer, IndexSet > IndexMap
Definition AABBtree.hh:82
std::set< Integer > IndexSet
Definition AABBtree.hh:81
std::unique_ptr< Box< Real, N > > BoxUniquePtr
Definition AABBtree.hh:88
std::vector< BoxUniquePtr< Real, N > > BoxUniquePtrList
Definition AABBtree.hh:89
std::vector< Integer > IndexList
Definition AABBtree.hh:83
Eigen::Vector< Real, N > Vector
Definition AABBtree.hh:90
AABBTREE_DEFAULT_INTEGER_TYPE Integer
The Integer type used in the AABBtree class.
Definition AABBtree.hh:78