KiCad PCB EDA Suite
FractureEdge Struct Reference

Public Member Functions

 FractureEdge (bool connected, SHAPE_LINE_CHAIN *owner, int index)
 
 FractureEdge (int y=0)
 
 FractureEdge (bool connected, const VECTOR2I &p1, const VECTOR2I &p2)
 
bool matches (int y) const
 

Public Attributes

bool m_connected
 
VECTOR2I m_p1
 
VECTOR2I m_p2
 
FractureEdgem_next
 

Detailed Description

Definition at line 614 of file shape_poly_set.cpp.

Constructor & Destructor Documentation

FractureEdge::FractureEdge ( bool  connected,
SHAPE_LINE_CHAIN owner,
int  index 
)
inline

Definition at line 616 of file shape_poly_set.cpp.

References SHAPE_LINE_CHAIN::CPoint().

616  :
617  m_connected( connected ),
618  m_next( NULL )
619  {
620  m_p1 = owner->CPoint( index );
621  m_p2 = owner->CPoint( index + 1 );
622  }
FractureEdge * m_next
const VECTOR2I & CPoint(int aIndex) const
Function CPoint()
FractureEdge::FractureEdge ( int  y = 0)
inline

Definition at line 624 of file shape_poly_set.cpp.

624  :
625  m_connected( false ),
626  m_next( NULL )
627  {
628  m_p1.x = m_p2.y = y;
629  }
FractureEdge * m_next
FractureEdge::FractureEdge ( bool  connected,
const VECTOR2I p1,
const VECTOR2I p2 
)
inline

Definition at line 631 of file shape_poly_set.cpp.

631  :
632  m_connected( connected ),
633  m_p1( p1 ),
634  m_p2( p2 ),
635  m_next( NULL )
636  {
637  }
FractureEdge * m_next

Member Function Documentation

bool FractureEdge::matches ( int  y) const
inline

Definition at line 639 of file shape_poly_set.cpp.

References max, and min.

640  {
641  int y_min = std::min( m_p1.y, m_p2.y );
642  int y_max = std::max( m_p1.y, m_p2.y );
643 
644  return ( y >= y_min ) && ( y <= y_max );
645  }
#define max(a, b)
Definition: auxiliary.h:86
#define min(a, b)
Definition: auxiliary.h:85

Member Data Documentation

bool FractureEdge::m_connected

Definition at line 647 of file shape_poly_set.cpp.

Referenced by SHAPE_POLY_SET::fractureSingle(), and processEdge().

FractureEdge* FractureEdge::m_next

Definition at line 649 of file shape_poly_set.cpp.

Referenced by SHAPE_POLY_SET::fractureSingle(), and processEdge().

VECTOR2I FractureEdge::m_p1

Definition at line 648 of file shape_poly_set.cpp.

Referenced by SHAPE_POLY_SET::fractureSingle(), and processEdge().

VECTOR2I FractureEdge::m_p2

Definition at line 648 of file shape_poly_set.cpp.

Referenced by processEdge().


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