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 657 of file shape_poly_set.cpp.

Constructor & Destructor Documentation

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

Definition at line 659 of file shape_poly_set.cpp.

References SHAPE_LINE_CHAIN::CPoint().

659  :
660  m_connected( connected ),
661  m_next( NULL )
662  {
663  m_p1 = owner->CPoint( index );
664  m_p2 = owner->CPoint( index + 1 );
665  }
FractureEdge * m_next
const VECTOR2I & CPoint(int aIndex) const
Function CPoint()
FractureEdge::FractureEdge ( int  y = 0)
inline

Definition at line 667 of file shape_poly_set.cpp.

667  :
668  m_connected( false ),
669  m_next( NULL )
670  {
671  m_p1.x = m_p2.y = y;
672  }
FractureEdge * m_next
FractureEdge::FractureEdge ( bool  connected,
const VECTOR2I p1,
const VECTOR2I p2 
)
inline

Definition at line 674 of file shape_poly_set.cpp.

674  :
675  m_connected( connected ),
676  m_p1( p1 ),
677  m_p2( p2 ),
678  m_next( NULL )
679  {
680  }
FractureEdge * m_next

Member Function Documentation

bool FractureEdge::matches ( int  y) const
inline

Definition at line 682 of file shape_poly_set.cpp.

References max, and min.

683  {
684  int y_min = std::min( m_p1.y, m_p2.y );
685  int y_max = std::max( m_p1.y, m_p2.y );
686 
687  return ( y >= y_min ) && ( y <= y_max );
688  }
#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 690 of file shape_poly_set.cpp.

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

FractureEdge* FractureEdge::m_next

Definition at line 692 of file shape_poly_set.cpp.

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

VECTOR2I FractureEdge::m_p1

Definition at line 691 of file shape_poly_set.cpp.

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

VECTOR2I FractureEdge::m_p2

Definition at line 691 of file shape_poly_set.cpp.

Referenced by processEdge().


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