|
TECA
The Toolkit for Extreme Climate Analysis
|
#include <teca_geometry.h>
Public Types | |
| using | element_type = coord_t |
Public Member Functions | |
| template<typename in_coord_t > | |
| void | copy (const in_coord_t *in_vx, const in_coord_t *in_vy, unsigned long in_n_verts) |
| deep copy the vertices of the polygon. More... | |
| void | normalize_coordinates () |
| transforms coordinates to be in [0 360 -90 90] More... | |
| bool | inside (coord_t px, coord_t py) const |
| returns true if a point is inside the polygon More... | |
| void | get_bounds (coord_t *bounds) const |
| void | to_stream (teca_binary_stream &bs) const |
| serialize to the given stream More... | |
| int | from_stream (teca_binary_stream &bs) |
| deseriealize from the given stream More... | |
Public Attributes | |
| std::shared_ptr< coord_t > | vx |
| std::shared_ptr< coord_t > | vy |
| unsigned long | n_verts |
@breif The vertices of a 2D polygon in clockwise order. The first and last point are required to be the same.
| void teca_geometry::polygon< coord_t >::copy | ( | const in_coord_t * | in_vx, |
| const in_coord_t * | in_vy, | ||
| unsigned long | in_n_verts | ||
| ) |
deep copy the vertices of the polygon.
| int teca_geometry::polygon< coord_t >::from_stream | ( | teca_binary_stream & | bs | ) |
deseriealize from the given stream
| void teca_geometry::polygon< coord_t >::get_bounds | ( | coord_t * | bounds | ) | const |
compute an axis aligned bounding box around the polygon with the layout [x0 x1 y0 y1].
| bool teca_geometry::polygon< coord_t >::inside | ( | coord_t | px, |
| coord_t | py | ||
| ) | const |
returns true if a point is inside the polygon
| void teca_geometry::polygon< coord_t >::normalize_coordinates |
transforms coordinates to be in [0 360 -90 90]
| void teca_geometry::polygon< coord_t >::to_stream | ( | teca_binary_stream & | bs | ) | const |
serialize to the given stream