UGDK
|
#include <pyramidworks/geometry/rect.h>
Public Member Functions | |
Rect (double _width, double _height) | |
double | width () const |
Returns the rect width. | |
double | height () const |
Returns the rect height. | |
bool | Intersects (const ugdk::Vector2D &this_pos, const GeometricShape *obj, const ugdk::Vector2D &that_pos) const |
Checks if this shape intersects another shape. | |
bool | Intersects (const ugdk::Vector2D &this_pos, const Rect *obj, const ugdk::Vector2D &that_pos) const |
Checks if there's an intersection with a Rect. | |
bool | Intersects (const ugdk::Vector2D &this_pos, const Circle *obj, const ugdk::Vector2D &that_pos) const |
Checks if there's an intersection with a Circle. | |
bool | Intersects (const ugdk::Vector2D &this_pos, const ConvexPolygon *obj, const ugdk::Vector2D &that_pos) const |
Checks if there's an intersection with a Convex Polygon. | |
ugdk::ikdtree::Box< 2 > | GetBoundingBox (const ugdk::Vector2D &position) const |
Returns a bounding box for this shape. |
A rect, one type of GeometricShape.
pyramidworks::geometry::Rect::Rect | ( | double | _width, |
double | _height | ||
) | [inline] |
width | The rect width. |
height | The rect height. |
ugdk::ikdtree::Box< 2 > pyramidworks::geometry::Rect::GetBoundingBox | ( | const ugdk::Vector2D & | position | ) | const [virtual] |
Returns a bounding box for this shape.
The box is at the shape's position and offset
position | The absolute position for this shape. |
Implements pyramidworks::geometry::GeometricShape.
double pyramidworks::geometry::Rect::height | ( | ) | const [inline] |
Returns the rect height.
bool pyramidworks::geometry::Rect::Intersects | ( | const ugdk::Vector2D & | this_pos, |
const GeometricShape * | obj, | ||
const ugdk::Vector2D & | that_pos | ||
) | const [virtual] |
Checks if this shape intersects another shape.
this_pos | The absolute position for this shape. |
obj | The shape to compare with. |
that_pos | The absolute position of the other shape. |
Implements pyramidworks::geometry::GeometricShape.
bool pyramidworks::geometry::Rect::Intersects | ( | const ugdk::Vector2D & | this_pos, |
const Rect * | obj, | ||
const ugdk::Vector2D & | that_pos | ||
) | const [virtual] |
Checks if there's an intersection with a Rect.
this_pos | The absolute position for this shape. |
obj | The shape to compare with. |
that_pos | The absolute position of the other shape. |
Implements pyramidworks::geometry::GeometricShape.
bool pyramidworks::geometry::Rect::Intersects | ( | const ugdk::Vector2D & | this_pos, |
const Circle * | obj, | ||
const ugdk::Vector2D & | that_pos | ||
) | const [virtual] |
Checks if there's an intersection with a Circle.
this_pos | The absolute position for this shape. |
obj | The shape to compare with. |
that_pos | The absolute position of the other shape. |
Implements pyramidworks::geometry::GeometricShape.
bool pyramidworks::geometry::Rect::Intersects | ( | const ugdk::Vector2D & | this_pos, |
const ConvexPolygon * | obj, | ||
const ugdk::Vector2D & | that_pos | ||
) | const [virtual] |
Checks if there's an intersection with a Convex Polygon.
this_pos | The absolute position for this shape. |
obj | The shape to compare with. |
that_pos | The absolute position of the other shape. |
Implements pyramidworks::geometry::GeometricShape.
double pyramidworks::geometry::Rect::width | ( | ) | const [inline] |
Returns the rect width.