Public Types | Public Member Functions | List of all members
lanelet::ConstHybridPolygon2d Class Reference

Polygon with access to primitive points. More...

#include <Polygon.h>

Inheritance diagram for lanelet::ConstHybridPolygon2d:
Inheritance graph
[legend]

Public Types

using const_iterator = BasicIterator
 
using ConstType = ConstHybridPolygon2d
 
using HybridType = ConstHybridPolygon2d
 
using iterator = BasicIterator
 
using PointType = BasicPoint2d
 
using ThreeDType = ConstHybridPolygon3d
 
using TwoDType = ConstHybridPolygon2d
 
- Public Types inherited from lanelet::ConstPolygon2d
using Category = traits::PolygonTag
 
using ConstType = ConstPolygon2d
 
using HybridType = ConstHybridPolygon2d
 
using MutableType = Polygon2d
 
using ThreeDType = ConstPolygon3d
 
using TwoDType = ConstPolygon2d
 
- Public Types inherited from lanelet::ConstLineStringImpl< Point2d >
using BasicIterator = internal::TransformIterator< const_iterator, const BasicPointType >
 
using BasicLineString = internal::SelectBasicLineStringT< BasicPointType >
 
using BasicPointType = traits::BasicPointT< Point2d >
 
using Category = traits::LineStringTag
 
using const_iterator = internal::SelectLsIteratorT< const ConstPointType >
 
using ConstPointType = traits::ConstPointT< Point2d >
 
using ConstSegmentType = traits::ConstPrimitiveType< SegmentType >
 
using difference_type = typename iterator::difference_type
 
using iterator = const_iterator
 
using MutablePointType = traits::MutablePointT< Point2d >
 linestring will return this point type More...
 
using PointType = ConstPointType
 
using SegmentType = Segment< Point2d >
 
using size_type = size_t
 
using value_type = ConstPointType
 
- Public Types inherited from lanelet::ConstPrimitive< LineStringData >
using DataType = LineStringData
 

Public Member Functions

BasicPointType back () const noexcept
 Get last BasicPoint2d. More...
 
BasicIterator begin () const noexcept
 BasicPoint2d Iterator to begin. More...
 
 ConstHybridPolygon2d ()=default
 
 ConstHybridPolygon2d (const ConstPolygon2d &poly)
 Conversion from ConstPolygon2d. More...
 
 ConstPolygon2d ()=default
 
 ConstPolygon2d (const ConstLineString2d &other)
 Conversion from/to ConstLineString2d. More...
 
BasicIterator end () const noexcept
 BasicPoint2d Iterator to past-the-end. More...
 
BasicPointType front () const noexcept
 Get first BasicPoint2d. More...
 
BasicPointType operator[] (size_t idx) const noexcept
 access element at specific position More...
 
- Public Member Functions inherited from lanelet::ConstPolygon2d
BasicPolygon2d basicPolygon () const
 create a simple 2d polygon from this (just a vector) More...
 
 ConstLineStringImpl (const ConstLineStringImpl &rhs)=default
 
template<typename OtherT >
 ConstLineStringImpl (const ConstLineStringImpl< OtherT > &other)
 construct from other ConstLineStrings More...
 
 ConstLineStringImpl (const std::shared_ptr< const LineStringData > &data, bool inverted=false)
 Constructs a linestring from the data object of another linestring. More...
 
 ConstLineStringImpl (ConstLineStringImpl &&rhs) noexcept=default
 
 ConstLineStringImpl (Id id=InvalId, Points3d points=Points3d(), const AttributeMap &attributes=AttributeMap())
 Constructs a LineString or similar from an Id and a list of points. More...
 
 ConstPolygon2d ()=default
 
 ConstPolygon2d (const ConstLineString2d &other)
 Conversion from/to ConstLineString2d. More...
 
size_t numSegments () const noexcept
 Returns the number of (geometrically valid) segments. More...
 
 operator BasicPolygon2d () const
 implicit conversion to a basic polygon in 2d More...
 
 operator ConstLineString2d () const
 
- Public Member Functions inherited from lanelet::ConstLineStringImpl< Point2d >
const ConstPointTypeback () const noexcept
 returns the last point (if it exist) More...
 
BasicIterator basicBegin () const noexcept
 returns a normal iterator to the internal point type at begin More...
 
BasicIterator basicEnd () const noexcept
 returns a normal iterator for the internal point type at end More...
 
BasicLineString basicLineString () const noexcept
 Create a basic linestring (ie a vector of Eigen Points) More...
 
const_iterator begin () const noexcept
 Returns an iterator to the start of the points. More...
 
 ConstLineStringImpl (const ConstLineStringImpl< OtherT > &other)
 construct from other ConstLineStrings More...
 
 ConstLineStringImpl (const std::shared_ptr< const LineStringData > &data, bool inverted=false)
 Constructs a linestring from the data object of another linestring. More...
 
 ConstLineStringImpl (Id id=InvalId, Points3d points=Points3d(), const AttributeMap &attributes=AttributeMap())
 Constructs a LineString or similar from an Id and a list of points. More...
 
bool empty () const noexcept
 return if there are any points in this object More...
 
const_iterator end () const noexcept
 Returns an iterator to end of the points. More...
 
const ConstPointTypefront () const noexcept
 returns the first point (if it exist) More...
 
bool inverted () const noexcept
 Returns whether this is an inverted linestring. More...
 
size_t numSegments () const noexcept
 Returns the number of (geometrically valid) segments. More...
 
const ConstPointTypeoperator[] (size_t idx) const noexcept
 returns the point at this position More...
 
ConstSegmentType segment (size_t idx) const noexcept
 returns the n-th segment. If n equals size() -1, the segment from back() to front() is returned. More...
 
size_t size () const noexcept
 Return the number of points in this linestring. More...
 
- Public Member Functions inherited from lanelet::ConstPrimitive< LineStringData >
const Attributeattribute (AttributeName name) const
 retrieve an attribute (enum version) More...
 
const Attributeattribute (const std::string &name) const
 retrieve an attribute More...
 
attributeOr (AttributeName name, T defaultVal) const
 retrieve an attribute (enum version) More...
 
attributeOr (const std::string &name, T defaultVal) const noexcept
 retrieve an attribute (string version) More...
 
const AttributeMapattributes () const
 get the attributes of this primitive More...
 
const std::shared_ptr< const LineStringData > & constData () const
 get the internal data of this primitive More...
 
 ConstPrimitive (const std::shared_ptr< const LineStringData > &data)
 Construct from a pointer to the data. More...
 
bool hasAttribute (AttributeName name) const noexcept
 check for an attribute (enum version) More...
 
bool hasAttribute (const std::string &name) const noexcept
 check whether this primitive has a specific attribute More...
 
Id id () const noexcept
 get the unique id of this primitive More...
 
bool operator!= (const ConstPrimitive &rhs) const
 
bool operator== (const ConstPrimitive &rhs) const
 

Additional Inherited Members

- Static Public Attributes inherited from lanelet::ConstLineStringImpl< Point2d >
static constexpr traits::Dimensions Dimension
 
- Static Public Attributes inherited from lanelet::ConstPrimitive< LineStringData >
static constexpr bool IsConst
 
- Protected Member Functions inherited from lanelet::ConstLineStringImpl< Point2d >
 ConstLineStringImpl (const ConstLineStringImpl &rhs)=default
 
 ConstLineStringImpl (ConstLineStringImpl &&rhs) noexcept=default
 
ConstLineStringImploperator= (const ConstLineStringImpl &rhs)=default
 
ConstLineStringImploperator= (ConstLineStringImpl &&rhs) noexcept=default
 
 ~ConstLineStringImpl () noexcept=default
 
- Protected Member Functions inherited from lanelet::ConstPrimitive< LineStringData >
 ConstPrimitive (const ConstPrimitive &rhs)=default
 
 ConstPrimitive (ConstPrimitive &&rhs) noexcept=default
 
ConstPrimitiveoperator= (const ConstPrimitive &rhs)=default
 
ConstPrimitiveoperator= (ConstPrimitive &&rhs) noexcept=default
 
 ~ConstPrimitive () noexcept=default
 

Detailed Description

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.

Definition at line 273 of file primitives/Polygon.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 275 of file primitives/Polygon.h.

◆ ConstType

Definition at line 279 of file primitives/Polygon.h.

◆ HybridType

Definition at line 283 of file primitives/Polygon.h.

◆ iterator

Definition at line 276 of file primitives/Polygon.h.

◆ PointType

Definition at line 282 of file primitives/Polygon.h.

◆ ThreeDType

Definition at line 281 of file primitives/Polygon.h.

◆ TwoDType

Definition at line 280 of file primitives/Polygon.h.

Constructor & Destructor Documentation

◆ ConstHybridPolygon2d() [1/2]

lanelet::ConstHybridPolygon2d::ConstHybridPolygon2d ( )
default

◆ ConstHybridPolygon2d() [2/2]

lanelet::ConstHybridPolygon2d::ConstHybridPolygon2d ( const ConstPolygon2d poly)
inlineexplicit

Conversion from ConstPolygon2d.

Definition at line 288 of file primitives/Polygon.h.

Member Function Documentation

◆ back()

BasicPointType lanelet::ConstHybridPolygon2d::back ( ) const
inlinenoexcept

Get last BasicPoint2d.

Definition at line 300 of file primitives/Polygon.h.

◆ begin()

BasicIterator lanelet::ConstHybridPolygon2d::begin ( ) const
inlinenoexcept

BasicPoint2d Iterator to begin.

Definition at line 291 of file primitives/Polygon.h.

◆ ConstPolygon2d() [1/2]

lanelet::ConstPolygon2d::ConstPolygon2d
default

◆ ConstPolygon2d() [2/2]

lanelet::ConstPolygon2d::ConstPolygon2d
inlineexplicit

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.

Definition at line 99 of file primitives/Polygon.h.

◆ end()

BasicIterator lanelet::ConstHybridPolygon2d::end ( ) const
inlinenoexcept

BasicPoint2d Iterator to past-the-end.

Definition at line 294 of file primitives/Polygon.h.

◆ front()

BasicPointType lanelet::ConstHybridPolygon2d::front ( ) const
inlinenoexcept

Get first BasicPoint2d.

Definition at line 297 of file primitives/Polygon.h.

◆ operator[]()

BasicPointType lanelet::ConstHybridPolygon2d::operator[] ( size_t  idx) const
inlinenoexcept

access element at specific position

Definition at line 303 of file primitives/Polygon.h.


The documentation for this class was generated from the following file:


lanelet2_core
Author(s): Fabian Poggenhans
autogenerated on Thu Mar 6 2025 03:25:52