DGtal 2.1.0
Loading...
Searching...
No Matches
SignedDistToCircle< Point > Struct Template Reference

[Templated signed_dist_to_unit_circle] More...

Public Types

using Real = typename Point::Component
 

Public Member Functions

 SignedDistToCircle (Point const &pt, Real r)
 
Real operator() (Point const &pt) const
 

Data Fields

Point center
 
Real radius
 

Detailed Description

template<typename Point>
struct SignedDistToCircle< Point >

[Templated signed_dist_to_unit_circle]

[Functor]

Definition at line 70 of file exampleFunctorHolder.cpp.

Member Typedef Documentation

◆ Real

template<typename Point >
using SignedDistToCircle< Point >::Real = typename Point::Component

Definition at line 72 of file exampleFunctorHolder.cpp.

Constructor & Destructor Documentation

◆ SignedDistToCircle()

template<typename Point >
SignedDistToCircle< Point >::SignedDistToCircle ( Point const &  pt,
Real  r 
)
inline

Definition at line 77 of file exampleFunctorHolder.cpp.

Member Function Documentation

◆ operator()()

template<typename Point >
Real SignedDistToCircle< Point >::operator() ( Point const &  pt) const
inline

Definition at line 82 of file exampleFunctorHolder.cpp.

83 {
84 return (pt - center).norm() - radius;
85 }

References SignedDistToCircle< Point >::center, MyPointD::norm(), and SignedDistToCircle< Point >::radius.

Field Documentation

◆ center

template<typename Point >
Point SignedDistToCircle< Point >::center

Definition at line 74 of file exampleFunctorHolder.cpp.

Referenced by SignedDistToCircle< Point >::operator()().

◆ radius

template<typename Point >
Real SignedDistToCircle< Point >::radius

Definition at line 75 of file exampleFunctorHolder.cpp.

Referenced by main(), and SignedDistToCircle< Point >::operator()().


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