Horizon
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI Struct Reference
Inheritance diagram for SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI:
SHAPE_LINE_CHAIN_BASE SHAPE SHAPE_BASE

Public Member Functions

 TRI (int _a=0, int _b=0, int _c=0, TRIANGULATED_POLYGON *aParent=nullptr)
 
virtual void Rotate (double aAngle, const VECTOR2I &aCenter={ 0, 0 }) override
 
virtual void Move (const VECTOR2I &aVector) override
 
virtual bool IsSolid () const override
 
virtual bool IsClosed () const override
 
virtual const BOX2I BBox (int aClearance=0) const override
 Compute a bounding box of the shape, with a margin of aClearance a collision.
 
virtual const VECTOR2I GetPoint (int aIndex) const override
 
virtual const SEG GetSegment (int aIndex) const override
 
virtual size_t GetPointCount () const override
 
virtual size_t GetSegmentCount () const override
 
- Public Member Functions inherited from SHAPE_LINE_CHAIN_BASE
 SHAPE_LINE_CHAIN_BASE (SHAPE_TYPE aType)
 
virtual bool Collide (const VECTOR2I &aP, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
 Check if point aP lies closer to us than aClearance.
 
virtual bool Collide (const SEG &aSeg, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
 Check if segment aSeg lies closer to us than aClearance.
 
SEG::ecoord SquaredDistance (const VECTOR2I &aP, bool aOutlineOnly=false) const
 
bool PointInside (const VECTOR2I &aPt, int aAccuracy=0, bool aUseBBoxCache=false) const
 Check if point aP lies inside a polygon (any type) defined by the line chain.
 
bool PointOnEdge (const VECTOR2I &aP, int aAccuracy=0) const
 Check if point aP lies on an edge or vertex of the line chain.
 
int EdgeContainingPoint (const VECTOR2I &aP, int aAccuracy=0) const
 Check if point aP lies on an edge or vertex of the line chain.
 
virtual BOX2IGetCachedBBox () const
 
- Public Member Functions inherited from SHAPE
 SHAPE (SHAPE_TYPE aType)
 Create an empty shape of type aType.
 
virtual SHAPEClone () const
 Return a dynamically allocated copy of the shape.
 
bool IsNull () const
 Return true if the shape is a null shape.
 
virtual bool Collide (const SHAPE *aShape, int aClearance, VECTOR2I *aMTV) const
 Check if the boundary of shape (this) lies closer to the shape aShape than aClearance, indicating a collision.
 
virtual bool Collide (const SHAPE *aShape, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const
 
virtual VECTOR2I Centre () const
 Compute a center-of-mass of the shape.
 
virtual bool Parse (std::stringstream &aStream)
 
virtual const std::string Format () const
 
- Public Member Functions inherited from SHAPE_BASE
 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)
 

Public Attributes

int a
 
int b
 
int c
 
TRIANGULATED_POLYGONparent
 

Additional Inherited Members

- Static Public Attributes inherited from SHAPE
static const int MIN_PRECISION_IU = 4
 This is the minimum precision for all the points in a shape.
 
- Protected Types inherited from SHAPE
typedef VECTOR2I::extended_type ecoord
 
- Protected Attributes inherited from SHAPE_BASE
SHAPE_TYPE m_type
 < type of our shape
 

Member Function Documentation

◆ BBox()

const BOX2I SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI::BBox ( int  aClearance = 0) const
overridevirtual

Compute a bounding box of the shape, with a margin of aClearance a collision.

Parameters
aClearancehow much the bounding box is expanded wrs to the minimum enclosing rectangle for the shape.
Returns
the bounding box.

Implements SHAPE.

◆ GetPoint()

virtual const VECTOR2I SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI::GetPoint ( int  aIndex) const
inlineoverridevirtual

Implements SHAPE_LINE_CHAIN_BASE.

◆ GetPointCount()

virtual size_t SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI::GetPointCount ( ) const
inlineoverridevirtual

Implements SHAPE_LINE_CHAIN_BASE.

◆ GetSegment()

virtual const SEG SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI::GetSegment ( int  aIndex) const
inlineoverridevirtual

Implements SHAPE_LINE_CHAIN_BASE.

◆ GetSegmentCount()

virtual size_t SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI::GetSegmentCount ( ) const
inlineoverridevirtual

Implements SHAPE_LINE_CHAIN_BASE.

◆ IsClosed()

virtual bool SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI::IsClosed ( ) const
inlineoverridevirtual

Implements SHAPE_LINE_CHAIN_BASE.

◆ IsSolid()

virtual bool SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI::IsSolid ( ) const
inlineoverridevirtual

Implements SHAPE.

◆ Move()

virtual void SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI::Move ( const VECTOR2I aVector)
inlineoverridevirtual

Implements SHAPE.

◆ Rotate()

virtual void SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI::Rotate ( double  aAngle,
const VECTOR2I aCenter = { 0, 0 } 
)
inlineoverridevirtual
Parameters
aCenteris the rotation center.
aAnglerotation angle in radians.

Implements SHAPE.


The documentation for this struct was generated from the following files: