| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- $#include "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);
- Vector2 Center() const;
- Vector2 Size() const;
- Vector2 HalfSize() const;
- bool Equals(const Rect& rhs) const;
- Intersection IsInside(const Vector2& point) 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();
- bool operator == (const IntRect& rhs) const;
-
- IntVector2 Size() const;
- int Width() const;
- int Height() const;
- Intersection IsInside(const IntVector2& point) const;
-
- 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;
- };
|