KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SHAPE_POLY_SET::TRIANGULATED_POLYGON Class Reference

#include <shape_poly_set.h>

Classes

struct  TRI
 

Public Member Functions

 TRIANGULATED_POLYGON (int aSourceOutline)
 
 TRIANGULATED_POLYGON (const TRIANGULATED_POLYGON &aOther)
 
 ~TRIANGULATED_POLYGON ()
 
void Clear ()
 
void GetTriangle (int index, VECTOR2I &a, VECTOR2I &b, VECTOR2I &c) const
 
TRIANGULATED_POLYGONoperator= (const TRIANGULATED_POLYGON &aOther)
 
void AddTriangle (int a, int b, int c)
 
void AddVertex (const VECTOR2I &aP)
 
size_t GetTriangleCount () const
 
int GetSourceOutlineIndex () const
 
void SetSourceOutlineIndex (int aIndex)
 
const std::deque< TRI > & Triangles () const
 
void SetTriangles (const std::deque< TRI > &aTriangles)
 
const std::deque< VECTOR2I > & Vertices () const
 
void SetVertices (const std::deque< VECTOR2I > &aVertices)
 
size_t GetVertexCount () const
 
void Move (const VECTOR2I &aVec)
 

Private Attributes

int m_sourceOutline
 
std::deque< TRIm_triangles
 
std::deque< VECTOR2Im_vertices
 

Detailed Description

Definition at line 76 of file shape_poly_set.h.

Constructor & Destructor Documentation

◆ TRIANGULATED_POLYGON() [1/2]

SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRIANGULATED_POLYGON ( int  aSourceOutline)

Definition at line 3517 of file shape_poly_set.cpp.

◆ TRIANGULATED_POLYGON() [2/2]

SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRIANGULATED_POLYGON ( const TRIANGULATED_POLYGON aOther)

Definition at line 3493 of file shape_poly_set.cpp.

References m_sourceOutline, m_triangles, and m_vertices.

◆ ~TRIANGULATED_POLYGON()

SHAPE_POLY_SET::TRIANGULATED_POLYGON::~TRIANGULATED_POLYGON ( )

Definition at line 3523 of file shape_poly_set.cpp.

Member Function Documentation

◆ AddTriangle()

void SHAPE_POLY_SET::TRIANGULATED_POLYGON::AddTriangle ( int  a,
int  b,
int  c 
)

Definition at line 3487 of file shape_poly_set.cpp.

References m_triangles.

Referenced by POLYGON_TRIANGULATION::earcutList().

◆ AddVertex()

void SHAPE_POLY_SET::TRIANGULATED_POLYGON::AddVertex ( const VECTOR2I aP)
inline

◆ Clear()

void SHAPE_POLY_SET::TRIANGULATED_POLYGON::Clear ( )
inline

Definition at line 148 of file shape_poly_set.h.

References m_triangles, and m_vertices.

Referenced by POLYGON_TRIANGULATION::TesselatePolygon().

◆ GetSourceOutlineIndex()

int SHAPE_POLY_SET::TRIANGULATED_POLYGON::GetSourceOutlineIndex ( ) const
inline

Definition at line 173 of file shape_poly_set.h.

References m_sourceOutline.

◆ GetTriangle()

void SHAPE_POLY_SET::TRIANGULATED_POLYGON::GetTriangle ( int  index,
VECTOR2I a,
VECTOR2I b,
VECTOR2I c 
) const
inline

◆ GetTriangleCount()

size_t SHAPE_POLY_SET::TRIANGULATED_POLYGON::GetTriangleCount ( ) const
inline

◆ GetVertexCount()

size_t SHAPE_POLY_SET::TRIANGULATED_POLYGON::GetVertexCount ( ) const
inline

Definition at line 194 of file shape_poly_set.h.

References m_vertices.

Referenced by POLYGON_TRIANGULATION::insertTriVertex().

◆ Move()

void SHAPE_POLY_SET::TRIANGULATED_POLYGON::Move ( const VECTOR2I aVec)
inline

Definition at line 199 of file shape_poly_set.h.

References m_vertices.

◆ operator=()

SHAPE_POLY_SET::TRIANGULATED_POLYGON & SHAPE_POLY_SET::TRIANGULATED_POLYGON::operator= ( const TRIANGULATED_POLYGON aOther)

Definition at line 3504 of file shape_poly_set.cpp.

References m_sourceOutline, m_triangles, and m_vertices.

◆ SetSourceOutlineIndex()

void SHAPE_POLY_SET::TRIANGULATED_POLYGON::SetSourceOutlineIndex ( int  aIndex)
inline

Definition at line 174 of file shape_poly_set.h.

References m_sourceOutline.

◆ SetTriangles()

void SHAPE_POLY_SET::TRIANGULATED_POLYGON::SetTriangles ( const std::deque< TRI > &  aTriangles)
inline

Definition at line 177 of file shape_poly_set.h.

References m_triangles.

Referenced by POLYGON_TRIANGULATION::TesselatePolygon().

◆ SetVertices()

void SHAPE_POLY_SET::TRIANGULATED_POLYGON::SetVertices ( const std::deque< VECTOR2I > &  aVertices)
inline

Definition at line 189 of file shape_poly_set.h.

References m_vertices.

◆ Triangles()

const std::deque< TRI > & SHAPE_POLY_SET::TRIANGULATED_POLYGON::Triangles ( ) const
inline

Definition at line 176 of file shape_poly_set.h.

References m_triangles.

Referenced by POLYGON_TRIANGULATION::TesselatePolygon().

◆ Vertices()

const std::deque< VECTOR2I > & SHAPE_POLY_SET::TRIANGULATED_POLYGON::Vertices ( ) const
inline

Definition at line 188 of file shape_poly_set.h.

References m_vertices.

Referenced by POLYGON_TRIANGULATION::TesselatePolygon().

Member Data Documentation

◆ m_sourceOutline

int SHAPE_POLY_SET::TRIANGULATED_POLYGON::m_sourceOutline
private

◆ m_triangles

std::deque<TRI> SHAPE_POLY_SET::TRIANGULATED_POLYGON::m_triangles
private

◆ m_vertices


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