Circle Class Reference
To store and treat a circular figure. More...
Inheritance diagram for Circle:
Public Member Functions | |
| Circle () | |
| Default construcor. | |
| Circle (const Point< double > &c, double r, int code=1) | |
| Constructor. | |
| void | setRadius (double r) |
| Assign radius of circle. | |
| double | getRadius () const |
| Return radius of circle. | |
| void | setCenter (const Point< double > &c) |
| Assign coordinates of center of circle. | |
| Point< double > | getCenter () const |
| Return coordinates of center of circle. | |
| double | getSignedDistance (const Point< double > &p) const |
| Return signed distance of a given point from the current circle. | |
| Circle & | operator+= (Point< double > a) |
| Operator +=. | |
| Circle & | operator+= (double a) |
| Operator *=. | |
| void | setCode (int code) |
| Choose a code for the domain defined by the figure. | |
| void | getSignedDistance (const Grid &g, Vect< double > &d) const |
| Calculate signed distance to current figure with respect to grid points. | |
| double | dLine (const Point< double > &p, const Point< double > &a, const Point< double > &b) const |
Detailed Description
To store and treat a circular figure.
Constructor & Destructor Documentation
Constructor.
- Parameters:
-
[in] c Coordinates of center of circle [in] r Radius [in] code Code to assign to the generated domain [Default: 1]
Member Function Documentation
| double getSignedDistance | ( | const Point< double > & | 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] p Point<double> instance
Reimplemented from Figure.
| Circle& operator+= | ( | double | a | ) |
Operator *=.
Scale circle by a factor a
| void getSignedDistance | ( | const Grid & | g, |
| Vect< double > & | d | ||
| ) | const [inherited] |
- OFELI
- Circle
Copyright © 1998-2012 Rachid Touzani