Class ConstHybridPolygon2d

Inheritance Relationships

Base Type

Class Documentation

class ConstHybridPolygon2d : public lanelet::ConstPolygon2d

Polygon with access to primitive points.

This polygon tries to behave as close to a BasicPolygon2d as possible while still keeping all properties (id, attributes) of a ConstPolygon2d. This is important as some functions of boost::geometry do not like our ConstPoint2d type.

As with all lanelet primitives, conversion from other primitives is cheap.

Public Types

using const_iterator = BasicIterator
using iterator = BasicIterator
using ConstType = ConstHybridPolygon2d
using TwoDType = ConstHybridPolygon2d
using ThreeDType = ConstHybridPolygon3d
using PointType = BasicPoint2d
using HybridType = ConstHybridPolygon2d

Public Functions

ConstHybridPolygon2d() = default
inline explicit ConstHybridPolygon2d(const ConstPolygon2d &poly)

Conversion from ConstPolygon2d.

inline BasicIterator begin() const noexcept

BasicPoint2d Iterator to begin.

inline BasicIterator end() const noexcept

BasicPoint2d Iterator to past-the-end.

inline BasicPointType front() const noexcept

Get first BasicPoint2d.

inline BasicPointType back() const noexcept

Get last BasicPoint2d.

inline BasicPointType operator[](size_t idx) const noexcept

access element at specific position

inline explicit ConstPolygon2d(const ConstLineString2d &other)

Conversion from/to ConstLineString2d.

This does not make sure that the polygon is valid and not self-intersecting! If you want to ensure this, use boost::polygon’s is_valid.

ConstPolygon2d() = default