To store and treat a polygonal figure. More...
#include <Figure.h>
Public Member Functions | |
| polygon () | |
| Default constructor. | |
| Polygon (const Vect< Point< real_t > > &v, int code=1) | |
| Constructor. | |
| void | setVertices (const Vect< Point< real_t > > &v) |
| Assign vertices of polygon. | |
| real_t | getSignedDistance (const Point< real_t > &p) const |
| Return signed distance of a given point from the current polygon. | |
| Polygon & | operator+= (Point< real_t > a) |
| Operator +=. | |
| Polygon & | operator+= (real_t a) |
| Operator *=. | |
| void | getSignedDistance (const Grid &g, Vect< real_t > &d) const |
| Calculate signed distance to current figure with respect to grid points. | |
| 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. | |
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. | |
| Figure & | operator= (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. | |
| 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. | |
To store and treat a polygonal figure.
Constructor.
| [in] | v | Vect instance containing list of coordinates of polygon vertices |
| [in] | code | Code to assign to the generated domain (Default value = 1) |
| 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.
| [in] | p | Point for which distance is computed |
| [in] | a | First vertex of line |
| [in] | b | Second vertex of line |
|
virtual |
Return signed distance of a given point from the current polygon.
The computed distance is negative if p lies in the polygon, negative if it is outside, and 0 on its boundary
| [in] | p | Point<double> instance |
Reimplemented from Figure.
| Polygon & operator+= | ( | real_t | a | ) |
Operator *=.
Scale polygon by a factor a