diff --git a/src/lol/algorithm/aabb_tree.h b/src/lol/algorithm/aabb_tree.h index 5ffecdc1..a288dc5e 100644 --- a/src/lol/algorithm/aabb_tree.h +++ b/src/lol/algorithm/aabb_tree.h @@ -333,8 +333,9 @@ public: } //-- - void SetSize(TV size) { m_size = size; } - void SetMaxDepth(int max_depth) { m_max_depth = max_depth; } + void SetSize(TV size) { m_size = size; } + void SetMaxDepth(int max_depth) { m_max_depth = max_depth; } + void SetMaxElement(int max_element) { m_max_element = max_element; } Array const & GetTree() const { diff --git a/src/lol/math/geometry.h b/src/lol/math/geometry.h index cd8f1b4c..985b21d5 100644 --- a/src/lol/math/geometry.h +++ b/src/lol/math/geometry.h @@ -79,6 +79,16 @@ template struct Box2 return *this = *this - v; } + Box2 operator *(Vec2 const &v) const + { + return Box2(A * v, B * v); + } + + Box2 &operator *=(Vec2 const &v) + { + return *this = *this * v; + } + bool operator ==(Box2 const &box) { return A == box.A && B == box.B; @@ -134,6 +144,16 @@ template struct Box3 return *this = *this - v; } + Box3 operator *(Vec3 const &v) const + { + return Box3(A * v, B * v); + } + + Box3 &operator *=(Vec3 const &v) + { + return *this = *this * v; + } + bool operator ==(Box3 const &box) { return A == box.A && B == box.B;