#include "pyramidworks/geometry/rect.h"
A rect, one type of GeometricShape.
pyramidworks::geometry::Rect::Rect |
( |
double |
_width, |
|
|
double |
_height |
|
) |
| |
|
inline |
- Parameters
-
width | The rect width. |
height | The rect height. |
Returns a bounding box for this shape.
The box is at the shape's position and offset
- Parameters
-
position | The absolute position for this shape. |
- Returns
- A 2D Box around this shape
Implements pyramidworks::geometry::GeometricShape.
double pyramidworks::geometry::Rect::height |
( |
| ) |
const |
|
inline |
Returns the rect height.
- Returns
- A double.
Checks if this shape intersects another shape.
- Parameters
-
this_pos | The absolute position for this shape. |
obj | The shape to compare with. |
that_pos | The absolute position of the other shape. |
- Returns
- True if there's an intersection.
Implements pyramidworks::geometry::GeometricShape.
Checks if there's an intersection with a Rect.
- Parameters
-
this_pos | The absolute position for this shape. |
obj | The shape to compare with. |
that_pos | The absolute position of the other shape. |
- Returns
- True if there's an intersection.
Implements pyramidworks::geometry::GeometricShape.
Checks if there's an intersection with a Circle.
- Parameters
-
this_pos | The absolute position for this shape. |
obj | The shape to compare with. |
that_pos | The absolute position of the other shape. |
- Returns
- True if there's an intersection.
Implements pyramidworks::geometry::GeometricShape.
Checks if there's an intersection with a Convex Polygon.
- Parameters
-
this_pos | The absolute position for this shape. |
obj | The shape to compare with. |
that_pos | The absolute position of the other shape. |
- Returns
- True if there's an intersection.
Implements pyramidworks::geometry::GeometricShape.
double pyramidworks::geometry::Rect::width |
( |
| ) |
const |
|
inline |
Returns the rect width.
- Returns
- A double.
The documentation for this class was generated from the following file:
- modules/ugdk-core/include/pyramidworks/geometry/rect.h