KiCad PCB EDA Suite
SHAPE_LINE_CHAIN::compareOriginDistance Struct Reference

#include <shape_line_chain.h>

Public Member Functions

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

Public Attributes

VECTOR2I m_origin

Detailed Description

Definition at line 484 of file shape_line_chain.h.

Constructor & Destructor Documentation

SHAPE_LINE_CHAIN::compareOriginDistance::compareOriginDistance ( const VECTOR2I aOrigin)

Definition at line 486 of file shape_line_chain.h.

486  :
487  m_origin( aOrigin )
488  {}

Member Function Documentation

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

Definition at line 490 of file shape_line_chain.h.

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

491  {
492  return ( m_origin - aA.p ).EuclideanNorm() < ( m_origin - aB.p ).EuclideanNorm();
493  }
double EuclideanNorm(const wxPoint &vector)
Euclidean norm of a 2D vector.
Definition: trigo.h:112

Member Data Documentation

VECTOR2I SHAPE_LINE_CHAIN::compareOriginDistance::m_origin

Definition at line 495 of file shape_line_chain.h.

Referenced by compareOriginDistance::operator()().

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