Rectangle class.
More...
List of all members.
Detailed Description
Constructor & Destructor Documentation
def Marmot::Common::Rect::Rect::__init__ |
( |
|
self, |
|
|
|
x0, |
|
|
|
y0, |
|
|
|
x1, |
|
|
|
y1 |
|
) |
| |
- Parameters:
-
x0 | the less of left and right |
y0 | the less of top and bottm |
x1 | the greater of left and right |
y1 | the greater of top and bottom |
Member Function Documentation
def Marmot::Common::Rect::Rect::isOverlap |
( |
|
self, |
|
|
|
rect |
|
) |
| |
- Parameters:
-
- Returns:
- True if rect overlaps with this rect;
False elsewise.
def Marmot::Common::Rect::Rect::isInside |
( |
|
self, |
|
|
|
rect |
|
) |
| |
- Parameters:
-
- Returns:
- True if this rect is inside rect; False elsewise.
def Marmot::Common::Rect::Rect::distanceX |
( |
|
self, |
|
|
|
rect |
|
) |
| |
- Parameters:
-
- Returns:
- distance along x axis.
def Marmot::Common::Rect::Rect::distanceY |
( |
|
self, |
|
|
|
rect |
|
) |
| |
- Parameters:
-
- Returns:
- distance along y axis.
def Marmot::Common::Rect::Rect::intersection |
( |
|
lhs, |
|
|
|
rhs |
|
) |
| |
- Parameters:
-
lhs | one rectangle |
rhs | the other rectangle |
- Returns:
- intersection of two rectangles.
def Marmot::Common::Rect::Rect::union |
( |
|
lhs, |
|
|
|
rhs |
|
) |
| |
- Parameters:
-
lhs | one rectangle |
rhs | the other rectangle |
- Returns:
- Union of two rectangles.
The documentation for this class was generated from the following file: