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 245 of file shape_line_chain.cpp.

Constructor & Destructor Documentation

compareOriginDistance::compareOriginDistance ( VECTOR2I aOrigin)
inline

Definition at line 247 of file shape_line_chain.cpp.

247  :
248  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 250 of file shape_line_chain.cpp.

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

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

Member Data Documentation

VECTOR2I compareOriginDistance::m_origin

Definition at line 256 of file shape_line_chain.cpp.


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