X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld%2FAABB.h;h=ca7b85729e6609efcbb4e156a1f729de70205b3b;hb=4c12267c6727caa3522ac5e38b4f8c17d544ef3e;hp=5b482c4cc701ae9fe6fa9eb8d568bb5b56508f87;hpb=7cf057b5b3a28c3896af27cb725fbf0b4f1459c2;p=orbi.git diff --git a/src/world/AABB.h b/src/world/AABB.h index 5b482c4..ca7b857 100644 --- a/src/world/AABB.h +++ b/src/world/AABB.h @@ -23,7 +23,11 @@ public: float Right() const { return rb.x; } float Bottom() const { return rb.y; } - Vector Position() const { return lt; } + Vector LeftTop() const { return lt; } + Vector LeftBottom() const { return Vector(lt.x, rb.y); } + Vector RightTop() const { return Vector(rb.x, lt.y); } + Vector RightBottom() const { return rb; } + Vector Center() const { return lt + HalfSize(); } Vector HalfSize() const { return Size() / 2.0f; } Vector Size() const { return size; }