KiCad PCB EDA Suite
|
#include "geometry/nearest.h"
#include <wx/debug.h>
#include <core/type_helpers.h>
#include <geometry/shape_utils.h>
Go to the source code of this file.
Functions | |
VECTOR2I | GetNearestPoint (const NEARABLE_GEOM &aGeom, const VECTOR2I &aPt) |
Get the nearest point on a geometry to a given point. | |
OPT_VECTOR2I | GetNearestPoint (const std::vector< NEARABLE_GEOM > &aGeoms, const VECTOR2I &aPt) |
Get the nearest point on any of a list of geometries to a given point. | |
VECTOR2I GetNearestPoint | ( | const NEARABLE_GEOM & | aGeom, |
const VECTOR2I & | aPt | ||
) |
Get the nearest point on a geometry to a given point.
Definition at line 58 of file nearest.cpp.
Referenced by PCB_GRID_HELPER::BestSnapAnchor(), and GetNearestPoint().
OPT_VECTOR2I GetNearestPoint | ( | const std::vector< NEARABLE_GEOM > & | aGeoms, |
const VECTOR2I & | aPt | ||
) |
Get the nearest point on any of a list of geometries to a given point.
aGeoms | The geometries to check. |
aPt | The point to find the nearest point to. |
Definition at line 96 of file nearest.cpp.
References VECTOR2< T >::Distance(), and GetNearestPoint().