CARLA
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Functions
Geometry.h File Reference
#include <cmath>
#include <optional>
#include <vector>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/linestring.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/geometries/multi_polygon.hpp>
#include <boost/geometry/index/rtree.hpp>

Go to the source code of this file.

Classes

struct  twinmodel::geom::Point3
 

Namespaces

namespace  twinmodel
 
namespace  twinmodel::geom
 

Typedefs

using twinmodel::geom::Box = bg::model::box< Point >
 
using twinmodel::geom::Line3 = std::vector< Point3 >
 
using twinmodel::geom::LineString = bg::model::linestring< Point >
 
using twinmodel::geom::MultiPolygon = bg::model::multi_polygon< Polygon >
 
using twinmodel::geom::Point = bg::model::d2::point_xy< double >
 
using twinmodel::geom::Polygon = bg::model::polygon< Point, true, true >
 
using twinmodel::geom::Ring = bg::model::ring< Point, true, true >
 

Functions

Point twinmodel::geom::Centroid (const Polygon &polygon)
 
double twinmodel::geom::HeadingAt (const LineString &line, double s)
 Heading of line at distance s, in radians.
 
double twinmodel::geom::Hypot (const Point &a, const Point &b)
 
Point twinmodel::geom::Interpolate (const LineString &line, double s)
 Point at distance s along line, shapely's LineString.interpolate.
 
double twinmodel::geom::Length (const LineString &line)
 
Polygon twinmodel::geom::MakeValid (const Polygon &polygon)
 bg::is_valid plus a correction pass, shapely's make_valid.
 
double twinmodel::geom::NormalizeAngle (double angle)
 Signed angle in (-pi, pi] that turns heading from into heading to.
 
LineString twinmodel::geom::OffsetLine (const LineString &line, double offset)
 Offset line sideways by offset metres, positive to the left.
 
std::vector< Polygon > twinmodel::geom::Polygonize (const std::vector< LineString > &edges)
 Build polygons from a set of noded edges, shapely's polygonize.
 
double twinmodel::geom::Project (const LineString &line, const Point &p)
 Distance along line of the projection of p, shapely's LineString.project.
 
LineString twinmodel::geom::Substring (const LineString &line, double from, double to)
 The piece of line between distances from and to, shapely's substring: endpoints are inserted so the cut is exact.
 
LineString twinmodel::geom::To2D (const Line3 &line)
 
Point twinmodel::geom::To2D (const Point3 &p)
 
MultiPolygon twinmodel::geom::UnaryUnion (const std::vector< Polygon > &polygons)