(9)

To store and treat a circular figure. More...

Inheritance diagram for Circle:
Figure

Public Member Functions

 Circle ()
 Default construcor.
 
 Circle (const Point< real_t > &c, real_t r, int code=1)
 Constructor. More...
 
void setRadius (real_t r)
 Assign radius of circle.
 
real_t getRadius () const
 Return radius of circle.
 
void setCenter (const Point< real_t > &c)
 Assign coordinates of center of circle.
 
Point< real_tgetCenter () const
 Return coordinates of center of circle.
 
real_t getSignedDistance (const Point< real_t > &p) const
 Return signed distance of a given point from the current circle. More...
 
Circleoperator+= (Point< real_t > a)
 Operator +=. More...
 
Circleoperator+= (real_t a)
 Operator *=. More...
 
- Public Member Functions inherited from Figure
 Figure ()
 Default constructor.
 
 Figure (const Figure &f)
 Copy constructor.
 
virtual ~Figure ()
 Destructor.
 
void setCode (int code)
 Choose a code for the domain defined by the figure.
 
Figureoperator= (const Figure &f)
 Operator =.
 
void getSignedDistance (const Grid &g, Vect< real_t > &d) const
 Calculate signed distance to current figure with respect to grid points. More...
 
real_t dLine (const Point< real_t > &p, const Point< real_t > &a, const Point< real_t > &b) const
 Compute signed distance from a line. More...
 

Detailed Description

To store and treat a circular figure.

Constructor & Destructor Documentation

◆ Circle()

Circle ( const Point< real_t > &  c,
real_t  r,
int  code = 1 
)

Constructor.

Parameters
[in]cCoordinates of center of circle
[in]rRadius
[in]codeCode to assign to the generated domain [Default: 1]

Member Function Documentation

◆ getSignedDistance()

real_t getSignedDistance ( const Point< real_t > &  p) const
virtual

Return signed distance of a given point from the current circle.

The computed distance is negative if p lies in the disk, positive if it is outside, and 0 on the circle

Parameters
[in]pPoint<double> instance

Reimplemented from Figure.

◆ operator+=() [1/2]

Circle& operator+= ( Point< real_t a)

Operator +=.

Translate circle by a vector a

◆ operator+=() [2/2]

Circle& operator+= ( real_t  a)

Operator *=.

Scale circle by a factor a