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

Constructor & Destructor Documentation

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

Definition at line 648 of file shape_poly_set.cpp.

References SHAPE_LINE_CHAIN::CPoint(), m_p1, and m_p2.

648  :
649  m_connected( connected ),
650  m_next( NULL )
651  {
652  m_p1 = owner->CPoint( index );
653  m_p2 = owner->CPoint( index + 1 );
654  }
FractureEdge * m_next
const VECTOR2I & CPoint(int aIndex) const
Function CPoint()
FractureEdge::FractureEdge ( int  y = 0)
inline

Definition at line 656 of file shape_poly_set.cpp.

References m_p1, m_p2, VECTOR2< T >::x, and VECTOR2< T >::y.

656  :
657  m_connected( false ),
658  m_next( NULL )
659  {
660  m_p1.x = m_p2.y = y;
661  }
FractureEdge * m_next
FractureEdge::FractureEdge ( bool  connected,
const VECTOR2I p1,
const VECTOR2I p2 
)
inline

Definition at line 663 of file shape_poly_set.cpp.

663  :
664  m_connected( connected ),
665  m_p1( p1 ),
666  m_p2( p2 ),
667  m_next( NULL )
668  {
669  }
FractureEdge * m_next

Member Function Documentation

bool FractureEdge::matches ( int  y) const
inline

Definition at line 671 of file shape_poly_set.cpp.

References m_p1, m_p2, max, min, and VECTOR2< T >::y.

672  {
673  int y_min = std::min( m_p1.y, m_p2.y );
674  int y_max = std::max( m_p1.y, m_p2.y );
675 
676  return ( y >= y_min ) && ( y <= y_max );
677  }
#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 679 of file shape_poly_set.cpp.

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

FractureEdge* FractureEdge::m_next

Definition at line 681 of file shape_poly_set.cpp.

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

VECTOR2I FractureEdge::m_p1
VECTOR2I FractureEdge::m_p2

Definition at line 680 of file shape_poly_set.cpp.

Referenced by FractureEdge(), matches(), and processEdge().


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