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

Constructor & Destructor Documentation

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

Definition at line 642 of file shape_poly_set.cpp.

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

642  :
643  m_connected( connected ),
644  m_next( NULL )
645  {
646  m_p1 = owner->CPoint( index );
647  m_p2 = owner->CPoint( index + 1 );
648  }
FractureEdge * m_next
const VECTOR2I & CPoint(int aIndex) const
Function CPoint()
FractureEdge::FractureEdge ( int  y = 0)
inline

Definition at line 650 of file shape_poly_set.cpp.

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

650  :
651  m_connected( false ),
652  m_next( NULL )
653  {
654  m_p1.x = m_p2.y = y;
655  }
FractureEdge * m_next
FractureEdge::FractureEdge ( bool  connected,
const VECTOR2I p1,
const VECTOR2I p2 
)
inline

Definition at line 657 of file shape_poly_set.cpp.

657  :
658  m_connected( connected ),
659  m_p1( p1 ),
660  m_p2( p2 ),
661  m_next( NULL )
662  {
663  }
FractureEdge * m_next

Member Function Documentation

bool FractureEdge::matches ( int  y) const
inline

Definition at line 665 of file shape_poly_set.cpp.

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

666  {
667  int y_min = std::min( m_p1.y, m_p2.y );
668  int y_max = std::max( m_p1.y, m_p2.y );
669 
670  return ( y >= y_min ) && ( y <= y_max );
671  }
#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 673 of file shape_poly_set.cpp.

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

FractureEdge* FractureEdge::m_next

Definition at line 675 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 674 of file shape_poly_set.cpp.

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


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