| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- $#include "Math/Rect.h"
- class Rect
- {
- Rect();
- Rect(const Rect& rect);
- Rect(const Vector2& min, const Vector2& max);
- Rect(float left, float top, float right, float bottom);
- Rect(const Vector4& vector);
- ~Rect();
- bool operator ==(const Rect& rhs) const;
- void Define(const Rect& rect);
- void Define(const Vector2& min, const Vector2& max);
- void Define(const Vector2& point);
- void Merge(const Vector2& point);
- void Merge(const Rect& rect);
- void Clear();
- void Clip(const Rect& rect);
-
- bool Defined() const;
- Vector2 Center() const;
- Vector2 Size() const;
- Vector2 HalfSize() const;
- bool Equals(const Rect& rhs) const;
- Intersection IsInside(const Vector2& point) const;
- Intersection IsInside(const Rect& rect) const;
- Vector4 ToVector4() const;
-
- String ToString() const;
- Vector2 min_ @ min;
- Vector2 max_ @ max;
- static const Rect FULL;
- static const Rect POSITIVE;
- static const Rect ZERO;
- tolua_readonly tolua_property__no_prefix Vector2 center;
- tolua_readonly tolua_property__no_prefix Vector2 size;
- tolua_readonly tolua_property__no_prefix Vector2 halfSize;
- };
- class IntRect
- {
- IntRect();
- IntRect(int left, int top, int right, int bottom);
- IntRect(const IntVector2& min, const IntVector2& max);
- ~IntRect();
- bool operator ==(const IntRect& rhs) const;
- IntVector2 Size() const;
- int Width() const;
- int Height() const;
- Intersection IsInside(const IntVector2& point) const;
- void Clip(const IntRect& rect);
- void Merge(const IntRect& rect);
- int left_ @ left;
- int top_ @ top;
- int right_ @ right;
- int bottom_ @ bottom;
- static const IntRect ZERO;
- tolua_readonly tolua_property__no_prefix IntVector2 size;
- tolua_readonly tolua_property__no_prefix int width;
- tolua_readonly tolua_property__no_prefix int height;
- };
|