|
| SHAPE_RECT () |
| Create an empty (0-sized) rectangle.
|
|
| SHAPE_RECT (int aX0, int aY0, int aW, int aH) |
| Create a rectangle defined by top-left corner (aX0, aY0), width aW and height aH.
|
|
| SHAPE_RECT (const VECTOR2I &aP0, int aW, int aH) |
| Create a rectangle defined by top-left corner aP0, width aW and height aH.
|
|
| SHAPE_RECT (const SHAPE_RECT &aOther) |
|
SHAPE * | Clone () const override |
| Return a dynamically allocated copy of the shape.
|
|
const BOX2I | BBox (int aClearance=0) const override |
| Compute a bounding box of the shape, with a margin of aClearance a collision.
|
|
int | Diagonal () const |
| Return length of the diagonal of the rectangle.
|
|
bool | Collide (const SHAPE *aShape, int aClearance, VECTOR2I *aMTV) const override |
| Check if the boundary of shape (this) lies closer to the shape aShape than aClearance, indicating a collision.
|
|
bool | Collide (const SHAPE *aShape, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override |
|
bool | Collide (const SEG &aSeg, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override |
| Check if the boundary of shape (this) lies closer to the point aP than aClearance, indicating a collision.
|
|
const VECTOR2I & | GetPosition () const |
|
const VECTOR2I | GetSize () const |
|
const int | GetWidth () const |
|
const int | GetHeight () const |
|
void | Move (const VECTOR2I &aVector) override |
|
void | Rotate (double aAngle, const VECTOR2I &aCenter={ 0, 0 }) override |
| This function has limited utility for SHAPE_RECT as non-cartesian rotations will distort the rectangle.
|
|
bool | IsSolid () const override |
|
const SHAPE_LINE_CHAIN | Outline () const |
|
virtual const std::string | Format () const override |
|
| SHAPE (SHAPE_TYPE aType) |
| Create an empty shape of type aType.
|
|
bool | IsNull () const |
| Return true if the shape is a null shape.
|
|
virtual bool | Collide (const VECTOR2I &aP, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const |
| Check if the boundary of shape (this) lies closer to the point aP than aClearance, indicating a collision.
|
|
virtual VECTOR2I | Centre () const |
| Compute a center-of-mass of the shape.
|
|
virtual bool | Parse (std::stringstream &aStream) |
|
| SHAPE_BASE (SHAPE_TYPE aType) |
| Create an empty shape of type aType.
|
|
SHAPE_TYPE | Type () const |
| Return the type of the shape.
|
|
virtual bool | HasIndexableSubshapes () const |
|
virtual size_t | GetIndexableSubshapeCount () const |
|
virtual void | GetIndexableSubshapes (std::vector< SHAPE * > &aSubshapes) |
|