File polygon.hpp
FileList > geometry > polygon.hpp
Go to the source code of this file
#include <cmath>#include <optional>#include <vector>#include "assert/assert.hpp"#include "utilities/coordinate.hpp"
Classes
| Type | Name |
|---|---|
| struct | PolygonWithHoles |
Public Functions
| Type | Name |
|---|---|
| std::vector< PolygonWithHoles > | clip_polygon_hole_free_to_extent (const PolygonWithHoles & poly, const Extent2D & bounds) |
| void | dedupe_consecutive_ring_vertices (std::vector< Coordinate2D< double > > & ring, double tolerance=1e-9) |
| bool | extent_contains (const Extent2D & outer, const Extent2D & inner) |
| std::vector< Coordinate2D< double > > | intersect_polygons (const std::vector< Coordinate2D< double > > & subject, const std::vector< Coordinate2D< double > > & clip) |
| bool | is_left_of (const Coordinate2D< double > & from, const Coordinate2D< double > & to, const Coordinate2D< double > & point) |
| void | normalize_polygon (PolygonWithHoles & poly) |
| bool | point_in_polygon_with_holes (const Coordinate2D< double > & point, const PolygonWithHoles & poly) |
| bool | point_in_ring (const Coordinate2D< double > & point, const std::vector< Coordinate2D< double > > & ring) |
| PolygonWithHoles | polygon_from_extent (const Extent2D & extent) |
| std::vector< Coordinate2D< double > > | reverse_ring (const std::vector< Coordinate2D< double > > & ring) |
| Extent2D | ring_extent (const std::vector< Coordinate2D< double > > & ring) |
| bool | segment_intersection (const Coordinate2D< double > & a1, const Coordinate2D< double > & a2, const Coordinate2D< double > & b1, const Coordinate2D< double > & b2, Coordinate2D< double > & out) |
| double | signed_area (const std::vector< Coordinate2D< double > > & ring) |
| void | snap_polygon_to_extents (PolygonWithHoles & poly, const std::vector< Extent2D > & extents, double tolerance) |
| void | snap_ring_to_extent (std::vector< Coordinate2D< double > > & ring, const Extent2D & extent, double tolerance) |
Public Functions Documentation
function clip_polygon_hole_free_to_extent
inline std::vector< PolygonWithHoles > clip_polygon_hole_free_to_extent (
const PolygonWithHoles & poly,
const Extent2D & bounds
)
function dedupe_consecutive_ring_vertices
inline void dedupe_consecutive_ring_vertices (
std::vector< Coordinate2D < double > > & ring,
double tolerance=1e-9
)
function extent_contains
function intersect_polygons
inline std::vector< Coordinate2D < double > > intersect_polygons (
const std::vector< Coordinate2D < double > > & subject,
const std::vector< Coordinate2D < double > > & clip
)
function is_left_of
inline bool is_left_of (
const Coordinate2D < double > & from,
const Coordinate2D < double > & to,
const Coordinate2D < double > & point
)
function normalize_polygon
function point_in_polygon_with_holes
inline bool point_in_polygon_with_holes (
const Coordinate2D < double > & point,
const PolygonWithHoles & poly
)
function point_in_ring
inline bool point_in_ring (
const Coordinate2D < double > & point,
const std::vector< Coordinate2D < double > > & ring
)
function polygon_from_extent
function reverse_ring
inline std::vector< Coordinate2D < double > > reverse_ring (
const std::vector< Coordinate2D < double > > & ring
)
function ring_extent
function segment_intersection
inline bool segment_intersection (
const Coordinate2D < double > & a1,
const Coordinate2D < double > & a2,
const Coordinate2D < double > & b1,
const Coordinate2D < double > & b2,
Coordinate2D < double > & out
)
function signed_area
function snap_polygon_to_extents
inline void snap_polygon_to_extents (
PolygonWithHoles & poly,
const std::vector< Extent2D > & extents,
double tolerance
)
function snap_ring_to_extent
inline void snap_ring_to_extent (
std::vector< Coordinate2D < double > > & ring,
const Extent2D & extent,
double tolerance
)
The documentation for this class was generated from the following file /home/runner/work/Blaze/Blaze/src/lib/geometry/polygon.hpp