KiCad PCB EDA Suite
Loading...
Searching...
No Matches
IDF_POINT Class Reference

A point as used by the various IDF related classes. More...

#include <idf_common.h>

Public Member Functions

 IDF_POINT ()
 
 IDF_POINT (double aX, double aY)
 
bool Matches (const IDF_POINT &aPoint, double aRadius=1e-5) const
 Return true if the given coordinate point is within the given radius of the point.
 
double CalcDistance (const IDF_POINT &aPoint) const
 Return the Euclidean distance between this point and the given point.
 

Public Attributes

double x
 
double y
 

Detailed Description

A point as used by the various IDF related classes.

Definition at line 425 of file idf_common.h.

Constructor & Destructor Documentation

◆ IDF_POINT() [1/2]

IDF_POINT::IDF_POINT ( )
inline

Definition at line 428 of file idf_common.h.

References x, and y.

Referenced by CalcDistance(), and Matches().

◆ IDF_POINT() [2/2]

IDF_POINT::IDF_POINT ( double aX,
double aY )
inline

Definition at line 434 of file idf_common.h.

References x, and y.

Member Function Documentation

◆ CalcDistance()

double IDF_POINT::CalcDistance ( const IDF_POINT & aPoint) const

Return the Euclidean distance between this point and the given point.

Parameters
aPointis the coordinates of the point whose distance is to be determined.
Returns
double is the distance between this point and aPoint.

Definition at line 810 of file idf_common.cpp.

References IDF_POINT(), x, and y.

Referenced by IDF_SEGMENT::IDF_SEGMENT().

◆ Matches()

bool IDF_POINT::Matches ( const IDF_POINT & aPoint,
double aRadius = 1e-5 ) const

Return true if the given coordinate point is within the given radius of the point.

Parameters
aPointis the coordinates of the point being compared.
aRadiusis the radius (mm) within which the points are considered the same.
Returns
true if this point matches the given point.

Definition at line 796 of file idf_common.cpp.

References IDF_POINT(), x, and y.

Referenced by IDF_DRILL_DATA::Matches(), and BOARD_OUTLINE::readOutlines().

Member Data Documentation

◆ x

◆ y


The documentation for this class was generated from the following files: