DGtal 2.1.0
Loading...
Searching...
No Matches
ImplicitDigitalBall3< TPoint3 > Struct Template Reference

Public Types

typedef TPoint3 Point
 

Public Member Functions

 ImplicitDigitalBall3 (double r)
 
bool operator() (const TPoint3 &p) const
 

Data Fields

double myR
 

Detailed Description

template<typename TPoint3>
struct ImplicitDigitalBall3< TPoint3 >

Example of a test. To be completed.

Definition at line 50 of file testBallQuadViewer.cpp.

Member Typedef Documentation

◆ Point

template<typename TPoint3 >
typedef TPoint3 ImplicitDigitalBall3< TPoint3 >::Point

Definition at line 51 of file testBallQuadViewer.cpp.

Constructor & Destructor Documentation

◆ ImplicitDigitalBall3()

template<typename TPoint3 >
ImplicitDigitalBall3< TPoint3 >::ImplicitDigitalBall3 ( double  r)
inline

Definition at line 53 of file testBallQuadViewer.cpp.

54 : myR( r )
55 {}

Member Function Documentation

◆ operator()()

template<typename TPoint3 >
bool ImplicitDigitalBall3< TPoint3 >::operator() ( const TPoint3 &  p) const
inline

Definition at line 57 of file testBallQuadViewer.cpp.

58 {
59 double x = ( (double) p[ 0 ] );
60 double y = ( (double) p[ 1 ] );
61 double z = ( (double) p[ 2 ] );
62 return ( x*x + y*y + z*z -myR*myR) <= 0.0;
63 }

References ImplicitDigitalBall3< TPoint3 >::myR.

Field Documentation

◆ myR

template<typename TPoint3 >
double ImplicitDigitalBall3< TPoint3 >::myR

Definition at line 64 of file testBallQuadViewer.cpp.

Referenced by ImplicitDigitalBall3< TPoint3 >::operator()().


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