DGtal 2.1.0
Loading...
Searching...
No Matches
BallPredicate< TPoint > Class Template Reference

Public Types

typedef TPoint Point
 

Public Member Functions

 BallPredicate (double aCx, double aCy, double aR)
 
bool operator() (const TPoint &aPoint) const
 

Private Attributes

double myCx
 
double myCy
 
double myR
 

Detailed Description

template<typename TPoint>
class BallPredicate< TPoint >

Definition at line 86 of file testFMM.cpp.

Member Typedef Documentation

◆ Point

template<typename TPoint >
typedef TPoint BallPredicate< TPoint >::Point

Definition at line 89 of file testFMM.cpp.

Constructor & Destructor Documentation

◆ BallPredicate()

template<typename TPoint >
BallPredicate< TPoint >::BallPredicate ( double  aCx,
double  aCy,
double  aR 
)
inline

Definition at line 93 of file testFMM.cpp.

93 :
94 myCx(aCx), myCy(aCy), myR(aR)
95 { ASSERT(myR > 0); };

References BallPredicate< TPoint >::myR.

Member Function Documentation

◆ operator()()

template<typename TPoint >
bool BallPredicate< TPoint >::operator() ( const TPoint &  aPoint) const
inline

Definition at line 97 of file testFMM.cpp.

98 {
99 double d = std::sqrt( std::pow( (myCx-aPoint[0] ), 2)
100 + std::pow( (myCy-aPoint[1] ), 2) );
101 if (d <= myR) return true;
102 else return false;
103 };
const Point aPoint(3, 4)

References aPoint, BallPredicate< TPoint >::myCx, BallPredicate< TPoint >::myCy, and BallPredicate< TPoint >::myR.

Field Documentation

◆ myCx

template<typename TPoint >
double BallPredicate< TPoint >::myCx
private

Definition at line 105 of file testFMM.cpp.

Referenced by BallPredicate< TPoint >::operator()().

◆ myCy

template<typename TPoint >
double BallPredicate< TPoint >::myCy
private

Definition at line 105 of file testFMM.cpp.

Referenced by BallPredicate< TPoint >::operator()().

◆ myR

template<typename TPoint >
double BallPredicate< TPoint >::myR
private

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