1#ifndef AREAS_HPP_CVK1NIAI
2#define AREAS_HPP_CVK1NIAI
4#include <vanetza/units/angle.hpp>
5#include <vanetza/units/area.hpp>
6#include <vanetza/units/length.hpp>
7#include <boost/variant.hpp>
32 latitude(0.0 * units::degree), longitude(0.0 * units::degree) {}
34 latitude(lat), longitude(lon) {}
35 units::GeoAngle latitude;
36 units::GeoAngle longitude;
49 Circle() : r(1.0 * units::si::meters) {}
55 Rectangle() : a(1.0 * units::si::meters), b(1.0 * units::si::meters) {}
62 Ellipse() : a(1.0 * units::si::meters), b(1.0 * units::si::meters) {}
69 boost::variant<Rectangle, Ellipse, Circle> shape;
111units::Area area_size(
const Area&);
116 return geometric_function(shape, p) > 0.0;
120bool outside_shape(
const SHAPE& shape,
const CartesianPosition& p)
122 return geometric_function(shape, p) < 0.0;
126bool at_shape_border(
const SHAPE& shape,
const CartesianPosition& p)
128 return geometric_function(shape, p) == 0.0;
132bool at_center_point(
const SHAPE& shape,
const CartesianPosition& p)
134 return geometric_function(shape, p) == 1.0;