KiCad PCB EDA Suite
compareOriginDistance Struct Reference

Public Member Functions

 compareOriginDistance (VECTOR2I &aOrigin)
 
bool operator() (const SHAPE_LINE_CHAIN::INTERSECTION &aA, const SHAPE_LINE_CHAIN::INTERSECTION &aB)
 

Public Attributes

VECTOR2I m_origin
 

Detailed Description

Definition at line 215 of file shape_line_chain.cpp.

Constructor & Destructor Documentation

compareOriginDistance::compareOriginDistance ( VECTOR2I aOrigin)
inline

Definition at line 217 of file shape_line_chain.cpp.

217  :
218  m_origin( aOrigin ) {};

Member Function Documentation

bool compareOriginDistance::operator() ( const SHAPE_LINE_CHAIN::INTERSECTION aA,
const SHAPE_LINE_CHAIN::INTERSECTION aB 
)
inline

Definition at line 220 of file shape_line_chain.cpp.

References EuclideanNorm(), m_origin, and SHAPE_LINE_CHAIN::INTERSECTION::p.

222  {
223  return ( m_origin - aA.p ).EuclideanNorm() < ( m_origin - aB.p ).EuclideanNorm();
224  }
double EuclideanNorm(const wxPoint &vector)
Euclidean norm of a 2D vector.
Definition: trigo.h:104
VECTOR2I p
point of intersection between our and their.

Member Data Documentation

VECTOR2I compareOriginDistance::m_origin

Definition at line 226 of file shape_line_chain.cpp.

Referenced by operator()().


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