diff options
author | chai <chaifix@163.com> | 2019-03-25 23:46:59 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-03-25 23:46:59 +0800 |
commit | 03b3b8ae80559745f98ef94569b421adddeb441f (patch) | |
tree | 7bf46892fef7453d4c25172333bd4fbddb29ee16 /source/libs/asura-lib-utils/math/rect.hpp | |
parent | 82956beb1fe17e1226327638c8ab22b5f5adfc1d (diff) |
*misc
Diffstat (limited to 'source/libs/asura-lib-utils/math/rect.hpp')
-rw-r--r-- | source/libs/asura-lib-utils/math/rect.hpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/source/libs/asura-lib-utils/math/rect.hpp b/source/libs/asura-lib-utils/math/rect.hpp index f635007..1751634 100644 --- a/source/libs/asura-lib-utils/math/rect.hpp +++ b/source/libs/asura-lib-utils/math/rect.hpp @@ -13,8 +13,20 @@ namespace AsuraEngine Rect(); ~Rect(T x, T y, T w, T h); - template <typename U> - explicit Rect(const Rect<U>& rect); + /// + /// x,yǷrectڡ + /// + bool Contain(T x, T y); + + /// + /// Ƿཻཻľ + /// + bool Intersect(const Rect& src, Rect& intersection); + + /// + /// Ƿཻཻľ + /// + static bool Intersect(const Rect<T>& src1, const Rect<T>& src2, Rect<T>& intersection); T x, y, w, h; }; @@ -25,8 +37,11 @@ namespace AsuraEngine typedef Rect<int> Recti; typedef Rect<unsigned int> Rectu; typedef Rect<float> Rectf; + typedef Rect<long> Reftl; } } +namespace AEMath = AsuraEngine::Math; + #endif
\ No newline at end of file |