Public Types | Public Member Functions | Private Attributes | List of all members
lanelet::ConstLanelet Class Reference

An immutable lanelet. More...

#include <Lanelet.h>

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

Public Types

using Category = traits::LaneletTag
 
using ConstType = ConstLanelet
 
using MutableType = Lanelet
 
using ThreeDType = ConstLanelet
 
using TwoDType = ConstLanelet
 
- Public Types inherited from lanelet::ConstPrimitive< LaneletData >
using DataType = LaneletData
 

Public Member Functions

ConstLineString3d centerline () const
 get the (cached) centerline of this lanelet. More...
 
ConstLineString2d centerline2d () const
 get the (cached) centerline of this lanelet in 2d. To be used in context of geometric calculations. More...
 
ConstLineString3d centerline3d () const
 get the (cached) centerline of this lanelet in 3d. To be used in context of geometric calculations. More...
 
 ConstLanelet (const std::shared_ptr< const LaneletData > &data, bool inverted=false)
 Construct from the data of a different Lanelet. More...
 
 ConstLanelet (Id id, const LineString3d &leftBound, const LineString3d &rightBound, const AttributeMap &attributes=AttributeMap(), const RegulatoryElementPtrs &regulatoryElements=RegulatoryElementPtrs())
 Constructs a lanelet from id, attributes, regulatoryElements and bounds. More...
 
 ConstLanelet (Id id=InvalId)
 Constructs an empty or invalid lanelet. More...
 
bool hasCustomCenterline () const
 Returns whether the centerline has been overridden by setCenterline. More...
 
ConstLanelet invert () const
 returns the inverted lanelet More...
 
bool inverted () const
 returns if this is an inverted lanelet More...
 
ConstLineString3d leftBound () const
 get the left bound. More...
 
ConstLineString2d leftBound2d () const
 get the left bound in 2d. To be used over leftBound where geometric calculations are required. More...
 
ConstLineString3d leftBound3d () const
 get the left bound in 3d. To be used over leftBound where geometric calculations are required. More...
 
CompoundPolygon2d polygon2d () const
 returns the surface covered by this lanelet as 2-dimensional polygon. More...
 
CompoundPolygon3d polygon3d () const
 returns the surface covered by this lanelet as 3-dimensional polygon. More...
 
RegulatoryElementConstPtrs regulatoryElements () const
 get a list of regulatory elements that affect this lanelet More...
 
template<typename RegElemT >
std::vector< std::shared_ptr< const RegElemT > > regulatoryElementsAs () const
 get the regulatoryElements that could be converted to RegElemT More...
 
void resetCache () const
 resets the internal cache of the centerline More...
 
ConstLineString3d rightBound () const
 get the right bound. More...
 
ConstLineString2d rightBound2d () const
 get the right bound in 2d. To be used over rightBound where geometric calculations are required. More...
 
ConstLineString3d rightBound3d () const
 get the right bound in 3d. To be used over rightBound where geometric calculations are required. More...
 
- Public Member Functions inherited from lanelet::ConstPrimitive< LaneletData >
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 LaneletData > & constData () const
 get the internal data of this primitive More...
 
 ConstPrimitive (const std::shared_ptr< const LaneletData > &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
 

Private Attributes

bool inverted_ {false}
 indicates if this lanelet is inverted More...
 

Additional Inherited Members

- Static Public Attributes inherited from lanelet::ConstPrimitive< LaneletData >
static constexpr bool IsConst
 
- Protected Member Functions inherited from lanelet::ConstPrimitive< LaneletData >
 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

An immutable lanelet.

Definition at line 131 of file primitives/Lanelet.h.

Member Typedef Documentation

◆ Category

Definition at line 137 of file primitives/Lanelet.h.

◆ ConstType

Definition at line 133 of file primitives/Lanelet.h.

◆ MutableType

Definition at line 134 of file primitives/Lanelet.h.

◆ ThreeDType

Definition at line 136 of file primitives/Lanelet.h.

◆ TwoDType

Definition at line 135 of file primitives/Lanelet.h.

Constructor & Destructor Documentation

◆ ConstLanelet() [1/3]

lanelet::ConstLanelet::ConstLanelet ( Id  id = InvalId)
inlineexplicit

Constructs an empty or invalid lanelet.

Definition at line 140 of file primitives/Lanelet.h.

◆ ConstLanelet() [2/3]

lanelet::ConstLanelet::ConstLanelet ( Id  id,
const LineString3d leftBound,
const LineString3d rightBound,
const AttributeMap attributes = AttributeMap(),
const RegulatoryElementPtrs regulatoryElements = RegulatoryElementPtrs() 
)
inline

Constructs a lanelet from id, attributes, regulatoryElements and bounds.

Definition at line 144 of file primitives/Lanelet.h.

◆ ConstLanelet() [3/3]

lanelet::ConstLanelet::ConstLanelet ( const std::shared_ptr< const LaneletData > &  data,
bool  inverted = false 
)
inlineexplicit

Construct from the data of a different Lanelet.

Definition at line 150 of file primitives/Lanelet.h.

Member Function Documentation

◆ centerline()

ConstLineString3d lanelet::ConstLanelet::centerline ( ) const
inline

get the (cached) centerline of this lanelet.

Definition at line 187 of file primitives/Lanelet.h.

◆ centerline2d()

ConstLineString2d lanelet::ConstLanelet::centerline2d ( ) const
inline

get the (cached) centerline of this lanelet in 2d. To be used in context of geometric calculations.

Definition at line 190 of file primitives/Lanelet.h.

◆ centerline3d()

ConstLineString3d lanelet::ConstLanelet::centerline3d ( ) const
inline

get the (cached) centerline of this lanelet in 3d. To be used in context of geometric calculations.

Definition at line 193 of file primitives/Lanelet.h.

◆ hasCustomCenterline()

bool lanelet::ConstLanelet::hasCustomCenterline ( ) const
inline

Returns whether the centerline has been overridden by setCenterline.

Definition at line 198 of file primitives/Lanelet.h.

◆ invert()

ConstLanelet lanelet::ConstLanelet::invert ( ) const
inline

returns the inverted lanelet

Definition at line 157 of file primitives/Lanelet.h.

◆ inverted()

bool lanelet::ConstLanelet::inverted ( ) const
inline

returns if this is an inverted lanelet

Definition at line 154 of file primitives/Lanelet.h.

◆ leftBound()

ConstLineString3d lanelet::ConstLanelet::leftBound ( ) const
inline

get the left bound.

Definition at line 160 of file primitives/Lanelet.h.

◆ leftBound2d()

ConstLineString2d lanelet::ConstLanelet::leftBound2d ( ) const
inline

get the left bound in 2d. To be used over leftBound where geometric calculations are required.

Definition at line 162 of file primitives/Lanelet.h.

◆ leftBound3d()

ConstLineString3d lanelet::ConstLanelet::leftBound3d ( ) const
inline

get the left bound in 3d. To be used over leftBound where geometric calculations are required.

Definition at line 164 of file primitives/Lanelet.h.

◆ polygon2d()

CompoundPolygon2d lanelet::ConstLanelet::polygon2d ( ) const

returns the surface covered by this lanelet as 2-dimensional polygon.

Definition at line 316 of file Lanelet.cpp.

◆ polygon3d()

CompoundPolygon3d lanelet::ConstLanelet::polygon3d ( ) const

returns the surface covered by this lanelet as 3-dimensional polygon.

Definition at line 314 of file Lanelet.cpp.

◆ regulatoryElements()

RegulatoryElementConstPtrs lanelet::ConstLanelet::regulatoryElements ( ) const
inline

get a list of regulatory elements that affect this lanelet

Definition at line 178 of file primitives/Lanelet.h.

◆ regulatoryElementsAs()

template<typename RegElemT >
std::vector<std::shared_ptr<const RegElemT> > lanelet::ConstLanelet::regulatoryElementsAs ( ) const
inline

get the regulatoryElements that could be converted to RegElemT

Definition at line 182 of file primitives/Lanelet.h.

◆ resetCache()

void lanelet::ConstLanelet::resetCache ( ) const
inline

resets the internal cache of the centerline

this can be necessary if an element of the linestring was modified somewhere else.

Definition at line 212 of file primitives/Lanelet.h.

◆ rightBound()

ConstLineString3d lanelet::ConstLanelet::rightBound ( ) const
inline

get the right bound.

Definition at line 169 of file primitives/Lanelet.h.

◆ rightBound2d()

ConstLineString2d lanelet::ConstLanelet::rightBound2d ( ) const
inline

get the right bound in 2d. To be used over rightBound where geometric calculations are required.

Definition at line 171 of file primitives/Lanelet.h.

◆ rightBound3d()

ConstLineString3d lanelet::ConstLanelet::rightBound3d ( ) const
inline

get the right bound in 3d. To be used over rightBound where geometric calculations are required.

Definition at line 173 of file primitives/Lanelet.h.

Member Data Documentation

◆ inverted_

bool lanelet::ConstLanelet::inverted_ {false}
private

indicates if this lanelet is inverted

Definition at line 215 of file primitives/Lanelet.h.


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


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