AeonGUI
A portable video game graphic user interface library.
Loading...
Searching...
No Matches
AABB.hpp
1/*
2Copyright (C) 2019,2025,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16#ifndef AEONGUI_AABB_H
17#define AEONGUI_AABB_H
18#include "aeongui/Platform.hpp"
19#include "aeongui/Vector2.hpp"
20namespace AeonGUI
21{
26 class AABB
27 {
28 public:
30 DLL AABB();
35 DLL AABB ( const Vector2& aCenter, const Vector2& aRadii );
39 DLL const Vector2& GetCenter() const;
43 DLL const Vector2& GetRadii() const;
47 DLL double GetX() const;
51 DLL double GetY() const;
55 DLL double GetWidth() const;
59 DLL double GetHeight() const;
60 private:
61 Vector2 mCenter{};
62 Vector2 mRadii{};
63 };
64}
65#endif
Platform-specific DLL import/export macros and compiler helpers.
double GetHeight() const
Get the height of the bounding box.
Definition AABB.cpp:33
const Vector2 & GetRadii() const
Get the radii (half-extents) of the bounding box.
Definition AABB.cpp:41
double GetX() const
Get the X coordinate of the top-left corner.
Definition AABB.cpp:21
const Vector2 & GetCenter() const
Get the center of the bounding box.
Definition AABB.cpp:37
double GetY() const
Get the Y coordinate of the top-left corner.
Definition AABB.cpp:25
double GetWidth() const
Get the width of the bounding box.
Definition AABB.cpp:29
AABB()
Default constructor. Initializes center and radii to zero.
2D vector of doubles.
Definition Vector2.hpp:31