mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
22 lines
452 B
C++
22 lines
452 B
C++
#pragma once
|
|
#include "include.h"
|
|
|
|
namespace MiniEngine {
|
|
|
|
class Rect
|
|
{
|
|
public:
|
|
int x, y, w, h;
|
|
Rect(int X, int Y, int W, int H);
|
|
explicit Rect(const SDL_Rect&);
|
|
Rect();
|
|
SDL_Rect toSDLRect() const;
|
|
bool isEmpty() const;
|
|
bool operator == (const Rect&) const;
|
|
bool hasIntersection(const Rect&) const;
|
|
Rect getIntersection(const Rect&) const;
|
|
Rect getUnion(const Rect&) const;
|
|
};
|
|
|
|
} /// End of namespace MiniEngine
|