Represents a rectangular area defined by a position and size, using signed 32-bit integers.
More...
#include <Box.h>
|
| Int2 | GetCenter () const |
| | Calculates and returns the center point of the box.
|
| |
|
Int2 | GetPosition () const |
| | Gets the position (top-left corner) of the box.
|
| |
|
Int2 | GetSize () const |
| | Gets the size (width and height) of the box.
|
| |
|
bool | operator== (const Box &box) const |
| | Compares this box with another for equality.
|
| |
|
constexpr | Box (int32 x, int32 y, int32 width, int32 height) |
| |
|
constexpr | Box (Int2 position, Int2 size) |
| |
|
bool | Intersects (const Int2 &ray) const |
| |
|
|
union { | |
| |
|
struct { | |
| |
|
int32 X | |
| |
|
int32 Y | |
| |
|
int32 Width | |
| |
|
int32 Height | |
| |
| } | | |
| |
|
int32 Raw [4] | |
| |
| }; | | |
| |
|
|
static const Box | Zero = Box(0, 0, 0, 0) |
| |
Represents a rectangular area defined by a position and size, using signed 32-bit integers.
◆ GetCenter()
| Int2 Box::GetCenter |
( |
| ) |
const |
|
inline |
Calculates and returns the center point of the box.
- Returns
- Int2 A vector representing the center of the box.
The documentation for this struct was generated from the following files:
- foundation/Math/Box.h
- foundation/Math/Math.cpp