Horizon
|
Public Member Functions | |
SHAPE_SEGMENT (const VECTOR2I &aA, const VECTOR2I &aB, int aWidth=0) | |
SHAPE_SEGMENT (const SEG &aSeg, int aWidth=0) | |
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. | |
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 segment aSeg than aClearance, indicating a collision. | |
bool | Collide (const VECTOR2I &aP, 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. | |
void | SetSeg (const SEG &aSeg) |
const SEG & | GetSeg () const |
void | SetWidth (int aWidth) |
int | GetWidth () const |
bool | IsSolid () const override |
void | Rotate (double aAngle, const VECTOR2I &aCenter={ 0, 0 }) override |
void | Move (const VECTOR2I &aVector) override |
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 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) |
Additional Inherited Members | |
![]() | |
static const int | MIN_PRECISION_IU = 4 |
This is the minimum precision for all the points in a shape. | |
![]() | |
typedef VECTOR2I::extended_type | ecoord |
![]() | |
SHAPE_TYPE | m_type |
< type of our shape | |
|
inlineoverridevirtual |
Compute a bounding box of the shape, with a margin of aClearance a collision.
aClearance | how much the bounding box is expanded wrs to the minimum enclosing rectangle for the shape. |
Implements SHAPE.
|
inlineoverridevirtual |
Return a dynamically allocated copy of the shape.
copy | of the shape |
Reimplemented from SHAPE.
|
inlineoverridevirtual |
Check if the boundary of shape (this) lies closer to the segment aSeg than aClearance, indicating a collision.
aActual | [out] an optional pointer to an int to be updated with the actual distance int the event of a collision. |
aLocation | [out] an option pointer to a point to store a nearby location in the event of a collision. |
Implements SHAPE.
|
inlineoverridevirtual |
Check if the boundary of shape (this) lies closer to the shape aShape than aClearance, indicating a collision.
aShape | shape to check collision against |
aClearance | minimum clearance |
aMTV | minimum translation vector |
aActual | [out] an optional pointer to an int to store the actual distance in the event of a collision. |
aLocation | [out] an option pointer to a point to store a nearby location in the event of a collision. |
Reimplemented from SHAPE.
|
inlineoverridevirtual |
Reimplemented from SHAPE.
|
inlineoverridevirtual |
Check if the boundary of shape (this) lies closer to the point aP than aClearance, indicating a collision.
aActual | [out] an optional pointer to an int to store the actual distance in the event of a collision. |
aLocation | [out] an option pointer to a point to store a nearby location in the event of a collision. |
Reimplemented from SHAPE.
|
overridevirtual |
Reimplemented from SHAPE.
|
inlineoverridevirtual |
Implements SHAPE.
|
inlineoverridevirtual |
aCenter | is the rotation center. |
aAngle | rotation angle in radians. |
Implements SHAPE.