13 Rect2D(
const Rect2D& other) =
default;
14 Rect2D(Rect2D&& other)
noexcept =
default;
15 Rect2D& operator=(
const Rect2D& other) =
default;
16 Rect2D& operator=(Rect2D&& other)
noexcept =
default;
18 Rect2D(
float width,
float height) : offset(0.0f, 0.0f), extent(width, height) {}
19 Rect2D(
float x,
float y,
float width,
float height) : offset(x, y), extent(width, height) {}
20 Rect2D(Grindstone::Math::Float2 extent) : offset(0, 0), extent(extent) {}
21 Rect2D(Grindstone::Math::Float2 offset, Grindstone::Math::Float2 extent) : offset(offset), extent(extent) {}
22 Rect2D(Grindstone::Math::Float4 v) : offset(v.x, v.y), extent(v.z, v.w) {}
24 float GetX()
const {
return offset.x; }
25 float GetY()
const {
return offset.y; }
26 float GetWidth()
const {
return extent.x; }
27 float GetHeight()
const {
return extent.y; }
29 Grindstone::Math::Float2 offset;
30 Grindstone::Math::Float2 extent;
34 IntRect2D() =
default;
35 IntRect2D(
const IntRect2D& other) =
default;
36 IntRect2D(IntRect2D&& other)
noexcept =
default;
37 IntRect2D& operator=(
const IntRect2D& other) =
default;
38 IntRect2D& operator=(IntRect2D&& other)
noexcept =
default;
40 IntRect2D(uint32_t width, uint32_t height) : offset(Grindstone::Math::Offset2D(0, 0)), extent(Grindstone::Math::Extent2D(width, height)) {}
41 IntRect2D(int32_t x, int32_t y, uint32_t width, uint32_t height) : offset(Grindstone::Math::Offset2D(x, y)), extent(Grindstone::Math::Extent2D(width, height)) {}
42 IntRect2D(Grindstone::Math::Extent2D extent) : offset(Grindstone::Math::Offset2D(0, 0)), extent(extent) {}
43 IntRect2D(Grindstone::Math::Offset2D offset, Grindstone::Math::Extent2D extent) : offset(offset), extent(extent) {}
45 int32_t GetX()
const {
return offset.x; }
46 int32_t GetY()
const {
return offset.y; }
47 uint32_t GetWidth()
const {
return extent.x; }
48 uint32_t GetHeight()
const {
return extent.y; }
50 Grindstone::Math::Offset2D offset;
51 Grindstone::Math::Extent2D extent;
56 Box3D(
const Box3D& other) =
default;
57 Box3D(Box3D&& other)
noexcept =
default;
58 Box3D& operator=(
const Box3D& other) =
default;
59 Box3D& operator=(Box3D&& other)
noexcept =
default;
61 Box3D(
float width,
float height,
float depth) : offset(0.0f, 0.0f, 0.0f), extent(width, height, depth) {}
62 Box3D(Grindstone::Math::Float3 extent) : offset(0.0f, 0.0f, 0.0f), extent(extent) {}
63 Box3D(
float x,
float y,
float z,
float width,
float height,
float depth) : offset(x, y, z), extent(width, height, depth) {}
64 Box3D(Grindstone::Math::Float3 offset, Grindstone::Math::Float3 extent) : offset(offset), extent(extent) {}
66 float GetX()
const {
return offset.x; }
67 float GetY()
const {
return offset.y; }
68 float GetZ()
const {
return offset.z; }
69 float GetWidth()
const {
return extent.x; }
70 float GetHeight()
const {
return extent.y; }
71 float GetDepth()
const {
return extent.z; }
73 Grindstone::Math::Float3 offset;
74 Grindstone::Math::Float3 extent;
79 IntBox3D(
const IntBox3D& other) =
default;
80 IntBox3D(IntBox3D&& other)
noexcept =
default;
81 IntBox3D& operator=(
const IntBox3D& other) =
default;
82 IntBox3D& operator=(IntBox3D&& other)
noexcept =
default;
84 IntBox3D(uint32_t width, uint32_t height, uint32_t depth) : offset(Grindstone::Math::Offset3D(0, 0, 0)), extent(Grindstone::Math::Extent3D(width, height, depth)) {}
85 IntBox3D(Grindstone::Math::Extent3D extent) : offset(Grindstone::Math::Offset3D(0, 0, 0)), extent(extent) {}
86 IntBox3D(int32_t x, int32_t y, int32_t z, uint32_t width, uint32_t height, uint32_t depth) : offset(Grindstone::Math::Offset3D(x, y, z)), extent(Grindstone::Math::Extent3D(width, height, depth)) {}
87 IntBox3D(Grindstone::Math::Offset3D offset, Grindstone::Math::Extent3D extent) : offset(offset), extent(extent) {}
89 int32_t GetX()
const {
return offset.x; }
90 int32_t GetY()
const {
return offset.y; }
91 int32_t GetZ()
const {
return offset.z; }
92 uint32_t GetWidth()
const {
return extent.x; }
93 uint32_t GetHeight()
const {
return extent.y; }
94 uint32_t GetDepth()
const {
return extent.z; }
96 Grindstone::Math::Offset3D offset;
97 Grindstone::Math::Extent3D extent;