cocos2d-x  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CCRect Class Reference

#include <CCGeometry.h>

Public Member Functions

 CCRect ()
 CCRect (float x, float y, float width, float height)
 CCRect (const CCRect &other)
CCRectoperator= (const CCRect &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 CCRect &rect) const
 return the topmost y-value of current rect More...
 
bool containsPoint (const CCPoint &point) const
bool intersectsRect (const CCRect &rect) const

Public Attributes

CCPoint origin
CCSize size

Constructor & Destructor Documentation

CCRect ( )
CCRect ( float  x,
float  y,
float  width,
float  height 
)
CCRect ( const CCRect other)

Member Function Documentation

bool containsPoint ( const CCPoint point) const
bool equals ( const CCRect rect) const

return the topmost y-value of current rect

float getMaxX ( ) const

return the midpoint x-value of current rect

float getMaxY ( ) const

return the midpoint y-value of current rect

float getMidX ( ) const

return the leftmost x-value of current rect

float getMidY ( ) const

return the bottommost y-value of current rect

float getMinX ( ) const
float getMinY ( ) const

return the rightmost x-value of current rect

bool intersectsRect ( const CCRect rect) const
CCRect& operator= ( const CCRect other)
void setRect ( float  x,
float  y,
float  width,
float  height 
)

Member Data Documentation

CCPoint origin
CCSize size

The documentation for this class was generated from the following file: