|
|
| SHAPE_RECT () |
| | Constructor Creates an empty (0-sized) rectangle.
|
| |
|
| SHAPE_RECT (int aX0, int aY0, int aW, int aH) |
| | Constructor Creates a rectangle defined by top-left corner (aX0, aY0), width aW and height aH.
|
| |
|
| SHAPE_RECT (const VECTOR2I &aP0, int aW, int aH) |
| | Constructor Creates a rectangle defined by top-left corner aP0, width aW and height aH.
|
| |
|
| SHAPE_RECT (const SHAPE_RECT &aOther) |
| |
| SHAPE * | Clone () const override |
| | Function Clone() More...
|
| |
| const BOX2I | BBox (int aClearance=0) const override |
| | Function BBox() More...
|
| |
| int | Diagonal () const |
| | Function Diagonal() More...
|
| |
| bool | Collide (const SEG &aSeg, int aClearance=0) const override |
| | Function Collide() More...
|
| |
| const VECTOR2I & | GetPosition () const |
| | Function GetPosition() More...
|
| |
| const VECTOR2I | GetSize () const |
| | Function GetSize() More...
|
| |
| const int | GetWidth () const |
| | Function GetWidth() More...
|
| |
| const int | GetHeight () const |
| | Function GetHeight() More...
|
| |
|
void | Move (const VECTOR2I &aVector) override |
| |
|
bool | IsSolid () const override |
| |
|
const SHAPE_LINE_CHAIN | Outline () const |
| |
| | SHAPE (SHAPE_TYPE aType) |
| | Constructor. More...
|
| |
| SHAPE_TYPE | Type () const |
| | Function Type() More...
|
| |
| virtual bool | Collide (const VECTOR2I &aP, int aClearance=0) const |
| | Function Collide() More...
|
| |
| virtual bool | Collide (const SHAPE *aShape, int aClearance, VECTOR2I &aMTV) const |
| | Function Collide() More...
|
| |
|
virtual bool | Collide (const SHAPE *aShape, int aClearance=0) const |
| |
| virtual VECTOR2I | Centre () const |
| | Function Centre() More...
|
| |
|
virtual bool | Parse (std::stringstream &aStream) |
| |
|
virtual const std::string | Format () const |
| |
|
|
typedef VECTOR2I::extended_type | ecoord |
| |
|
SHAPE_TYPE | m_type |
| |
type of our shape
|
| |
◆ BBox()
| const BOX2I SHAPE_RECT::BBox |
( |
int |
aClearance = 0 | ) |
const |
|
inlineoverridevirtual |
Function BBox()
Computes a bounding box of the shape, with a margin of aClearance a collision.
- Parameters
-
| aClearance | how much the bounding box is expanded wrs to the minimum enclosing rectangle for the shape. |
- Returns
- the bounding box.
Implements SHAPE.
◆ Clone()
| SHAPE* SHAPE_RECT::Clone |
( |
| ) |
const |
|
inlineoverridevirtual |
Function Clone()
Returns a dynamically allocated copy of the shape
- Return values
-
Reimplemented from SHAPE.
◆ Collide()
| bool SHAPE_RECT::Collide |
( |
const SEG & |
aSeg, |
|
|
int |
aClearance = 0 |
|
) |
| const |
|
overridevirtual |
Function Collide()
Checks if the boundary of shape (this) lies closer to the point aP than aClearance, indicating a collision.
- Returns
- true, if there is a collision.
Implements SHAPE.
◆ Diagonal()
| int SHAPE_RECT::Diagonal |
( |
| ) |
const |
|
inline |
Function Diagonal()
Returns length of the diagonal of the rectangle
- Returns
- diagonal length
◆ GetHeight()
| const int SHAPE_RECT::GetHeight |
( |
| ) |
const |
|
inline |
◆ GetPosition()
| const VECTOR2I& SHAPE_RECT::GetPosition |
( |
| ) |
const |
|
inline |
◆ GetSize()
| const VECTOR2I SHAPE_RECT::GetSize |
( |
| ) |
const |
|
inline |
Function GetSize()
- Returns
- size of the rectangle
◆ GetWidth()
| const int SHAPE_RECT::GetWidth |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files:
- 3rd_party/router/include/geometry/shape_rect.h
- 3rd_party/router/common/geometry/shape_collisions.cpp