#include <CCGeometry.h>
Public Member Functions | |
Rect () | |
Rect (float x, float y, float width, float height) | |
Rect (const Rect &other) | |
Rect & | operator= (const Rect &other) |
void | setRect (float x, float y, float width, float height) |
float | getMinX () const |
float | getMidX () const |
return the leftmost x-value of current rect More... | |
float | getMaxX () const |
return the midpoint x-value of current rect More... | |
float | getMinY () const |
return the rightmost x-value of current rect More... | |
float | getMidY () const |
return the bottommost y-value of current rect More... | |
float | getMaxY () const |
return the midpoint y-value of current rect More... | |
bool | equals (const Rect &rect) const |
return the topmost y-value of current rect More... | |
bool | containsPoint (const Point &point) const |
bool | intersectsRect (const Rect &rect) const |
Rect | unionWithRect (const Rect &rect) const |
Public Attributes | |
Point | origin |
Size | size |
Static Public Attributes | |
static const Rect | ZERO |
Rect | ( | ) |
local Rect | ( | ) |
Rect | ( | float | x, |
float | y, | ||
float | width, | ||
float | height | ||
) |
local Rect | ( | local | x, |
local | y, | ||
local | width, | ||
local | height | ||
) |
bool containsPoint | ( | const Point & | point) | const |
local containsPoint | ( | local | point) |
bool equals | ( | const Rect & | rect) | const |
return the topmost y-value of current rect
local equals | ( | local | rect) |
return the topmost y-value of current rect
float getMaxX | ( | ) | const |
return the midpoint x-value of current rect
local getMaxX | ( | ) |
return the midpoint x-value of current rect
float getMaxY | ( | ) | const |
return the midpoint y-value of current rect
local getMaxY | ( | ) |
return the midpoint y-value of current rect
float getMidX | ( | ) | const |
return the leftmost x-value of current rect
local getMidX | ( | ) |
return the leftmost x-value of current rect
float getMidY | ( | ) | const |
return the bottommost y-value of current rect
local getMidY | ( | ) |
return the bottommost y-value of current rect
float getMinX | ( | ) | const |
local getMinX | ( | ) |
float getMinY | ( | ) | const |
return the rightmost x-value of current rect
local getMinY | ( | ) |
return the rightmost x-value of current rect
bool intersectsRect | ( | const Rect & | rect) | const |
local intersectsRect | ( | local | rect) |
void setRect | ( | float | x, |
float | y, | ||
float | width, | ||
float | height | ||
) |
Point origin |
var origin |
local origin |
Size size |
var size |
local size |
|
static |
|
static |
|
static |