1 #ifndef _RIVE_AABB_HPP_
2 #define _RIVE_AABB_HPP_
22 float minX, minY, maxX, maxY;
28 AABB(const AABB& copy);
29 AABB(float minX, float minY, float maxX, float maxY);
31 inline const float* values() const { return buffer; }
33 float& operator[](std::size_t idx) { return buffer[idx]; }
34 const float& operator[](std::size_t idx) const { return buffer[idx]; }
36 static void center(Vec2D& out, const AABB& a);
37 static void size(Vec2D& out, const AABB& a);
38 static void extents(Vec2D& out, const AABB& a);
39 static void combine(AABB& out, const AABB& a, const AABB& b);
40 static bool contains(const AABB& a, const AABB& b);
41 static bool isValid(const AABB& a);
42 static bool testOverlap(const AABB& a, const AABB& b);
43 static bool areIdentical(const AABB& a, const AABB& b);
44 static void transform(AABB& out, const AABB& a, const Mat2D& matrix);
48 float perimeter() const;