|
TECA
The Toolkit for Extreme Climate Analysis
|
Codes dealing with computational geometry. More...
Classes | |
| struct | polygon |
Functions | |
| template<typename n_t > | |
| 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 > | |
| bool | point_in_poly (n_t px, n_t py, n_t *vx, n_t *vy, unsigned long nppts) |
Codes dealing with computational geometry.
| 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.
| bool teca_geometry::point_in_poly | ( | n_t | px, |
| n_t | py, | ||
| n_t * | vx, | ||
| 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. |