|
TECA
The Toolkit for Extreme Climate Analysis
|
Codes dealing with computational geometry. More...
Classes | |
| struct | polygon |
Functions | |
| template<typename n_t > | |
| TECA_EXPORT bool | left (n_t e0x, n_t e0y, n_t e1x, n_t e1y, n_t px, n_t py) |
| tests if a point is Left|On|Right of an infinite line. More... | |
| template<typename n_t > | |
| TECA_EXPORT bool | point_in_poly (n_t px, n_t py, const n_t *vx, const n_t *vy, unsigned long nppts) |
Codes dealing with computational geometry.
| TECA_EXPORT bool teca_geometry::left | ( | n_t | e0x, |
| n_t | e0y, | ||
| n_t | e1x, | ||
| n_t | e1y, | ||
| n_t | px, | ||
| n_t | py | ||
| ) |
tests if a point is Left|On|Right of an infinite line.
| TECA_EXPORT bool teca_geometry::point_in_poly | ( | n_t | px, |
| n_t | py, | ||
| const n_t * | vx, | ||
| const n_t * | vy, | ||
| unsigned long | nppts | ||
| ) |
Winding number test for a point in a polygon. The winding number is 0 when the point is outside. The polygon is defined a series of x, y points in counter clockwise order. Defining in clock wise order changes the sign of the winding number. the first and last point of the polygon are required to be the same.
| [in] | px | the x coordinate of the point. |
| [in] | py | the y coordinate of the point. |
| [in] | vx | the x coordinates of the polygon. |
| [in] | vy | the y coordinates of the polygon. |
| [in] | nppts | the number of points in the polygon. |