LibreCAD
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lc::EntityCoordinateSorter Struct Reference

#include <entitycoordinate.h>

Collaboration diagram for lc::EntityCoordinateSorter:

Public Member Functions

 EntityCoordinateSorter (const geo::Coordinate &reference)
 
bool operator() (const EntityCoordinate &i1, const EntityCoordinate &i2)
 

Public Attributes

const geo::Coordinate _reference
 

Detailed Description

Definition at line 56 of file entitycoordinate.h.

Constructor & Destructor Documentation

lc::EntityCoordinateSorter::EntityCoordinateSorter ( const geo::Coordinate reference)
inline

Definition at line 57 of file entitycoordinate.h.

57 : _reference(reference) { }
const geo::Coordinate _reference

Member Function Documentation

bool lc::EntityCoordinateSorter::operator() ( const EntityCoordinate i1,
const EntityCoordinate i2 
)
inline

Definition at line 59 of file entitycoordinate.h.

59  {
60  const auto d1 = i1.coordinate().distanceTo(_reference);
61  const auto d2 = i2.coordinate().distanceTo(_reference);
62  return d1 < d2;
63  }
const geo::Coordinate _reference

Member Data Documentation

const geo::Coordinate lc::EntityCoordinateSorter::_reference

Definition at line 65 of file entitycoordinate.h.


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