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

The famous (mutable) lanelet class. More...

#include <Lanelet.h>

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

Public Types

using ThreeDType = Lanelet
 
using TwoDType = Lanelet
 
- Public Types inherited from lanelet::Primitive< ConstLanelet >
using DataType = typename ConstLanelet ::DataType
 
- Public Types inherited from lanelet::ConstLanelet
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

void addRegulatoryElement (RegulatoryElementPtr regElem)
 Add a new regulatory element. More...
 
Lanelet invert () const
 non-const version to invert a lanelet More...
 
 Lanelet ()=default
 
 Lanelet (const LaneletDataPtr &data, bool inverted)
 
 Lanelet (const std::shared_ptr< const LaneletData > &, bool inverted)=delete
 
LineString3d leftBound ()
 Get the left bound. More...
 
LineString2d leftBound2d ()
 get the left bound in 2d. To be used over leftBound where geometric calculations are required. More...
 
LineString3d leftBound3d ()
 get the left bound in 3d. To be used over leftBound where geometric calculations are required. More...
 
 Primitive ()=default
 
 Primitive (const Primitive &rhs) noexcept
 
template<typename OtherT >
 Primitive (const Primitive< OtherT > &rhs)
 Construct from another primitive. Only works if both share the same. More...
 
 Primitive (const std::shared_ptr< const DataType > &)=delete
 
 Primitive (const std::shared_ptr< DataType > &data)
 Construct a new primitive from shared_ptr to its data. More...
 
 Primitive (Primitive &&rhs) noexcept
 
const RegulatoryElementPtrsregulatoryElements ()
 Return regulatoryElements that affect this lanelet. More...
 
template<typename RegElemT >
std::vector< std::shared_ptr< RegElemT > > regulatoryElementsAs ()
 Get the regulatoryElements that could be converted to RegElemT. More...
 
bool removeRegulatoryElement (const RegulatoryElementPtr &regElem)
 Removes a regulatory element, returns true on success. More...
 
LineString3d rightBound ()
 Get the right bound. More...
 
ConstLineString3d rightBound () const
 get the right bound. More...
 
LineString2d rightBound2d ()
 get the right bound in 2d. To be used over rightBound where geometric calculations are required. More...
 
LineString3d rightBound3d ()
 get the right bound in 3d. To be used over rightBound where geometric calculations are required. More...
 
void setCenterline (const LineString3d &centerline)
 
void setLeftBound (const LineString3d &bound)
 Sets a new left bound and resets the cached centerline. More...
 
void setRightBound (const LineString3d &bound)
 Sets a new right bound and resets the cached centerline. More...
 
- Public Member Functions inherited from lanelet::Primitive< ConstLanelet >
AttributeMapattributes () noexcept
 get the attributes in a mutable way More...
 
 Primitive ()=default
 
 Primitive (const Primitive< OtherT > &rhs)
 Construct from another primitive. Only works if both share the same. More...
 
 Primitive (const std::shared_ptr< const DataType > &)=delete
 
 Primitive (const std::shared_ptr< DataType > &data)
 Construct a new primitive from shared_ptr to its data. More...
 
void setAttribute (AttributeName name, const Attribute &attribute)
 set or overwrite an attribute (enum version) More...
 
void setAttribute (const std::string &name, const Attribute &attribute)
 set or overwrite an attribute More...
 
void setId (Id id) noexcept
 set a new id for this primitive More...
 
- Public Member Functions inherited from lanelet::ConstLanelet
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
 

Friends

class ConstWeakLanelet
 
template<typename >
class Primitive
 

Additional Inherited Members

- Static Public Attributes inherited from lanelet::Primitive< ConstLanelet >
static constexpr bool IsConst
 
- Static Public Attributes inherited from lanelet::ConstPrimitive< LaneletData >
static constexpr bool IsConst
 
- Protected Member Functions inherited from lanelet::Primitive< ConstLanelet >
std::shared_ptr< DataTypedata () const
 
Primitiveoperator= (const Primitive &rhs) noexcept
 
Primitiveoperator= (Primitive &&rhs) noexcept
 
 Primitive (const Primitive &rhs) noexcept
 
 Primitive (Primitive &&rhs) noexcept
 
 ~Primitive () noexcept=default
 
- 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

The famous (mutable) lanelet class.

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

Member Typedef Documentation

◆ ThreeDType

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

◆ TwoDType

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

Constructor & Destructor Documentation

◆ Lanelet() [1/3]

lanelet::Lanelet::Lanelet ( )
default

◆ Lanelet() [2/3]

lanelet::Lanelet::Lanelet ( const std::shared_ptr< const LaneletData > &  ,
bool  inverted 
)
delete

◆ Lanelet() [3/3]

lanelet::Lanelet::Lanelet ( const LaneletDataPtr data,
bool  inverted 
)
inline

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

Member Function Documentation

◆ addRegulatoryElement()

void lanelet::Lanelet::addRegulatoryElement ( RegulatoryElementPtr  regElem)
inline

Add a new regulatory element.

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

◆ invert()

Lanelet lanelet::Lanelet::invert ( ) const
inline

non-const version to invert a lanelet

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

◆ leftBound()

LineString3d lanelet::Lanelet::leftBound ( )
inline

Get the left bound.

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

◆ leftBound2d()

LineString2d lanelet::Lanelet::leftBound2d ( )
inline

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

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

◆ leftBound3d()

LineString3d lanelet::Lanelet::leftBound3d ( )
inline

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

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

◆ Primitive() [1/6]

lanelet::Primitive< DerivedConstPrimitive >::Primitive
default

◆ Primitive() [2/6]

lanelet::Primitive< DerivedConstPrimitive >::Primitive
defaultnoexcept

◆ Primitive() [3/6]

template<typename OtherT >
lanelet::Primitive< DerivedConstPrimitive >::Primitive ( typename OtherT  )
inlineexplicit

Construct from another primitive. Only works if both share the same.

Definition at line 262 of file Primitive.h.

◆ Primitive() [4/6]

lanelet::Primitive< DerivedConstPrimitive >::Primitive
delete

◆ Primitive() [5/6]

lanelet::Primitive< DerivedConstPrimitive >::Primitive
inlineexplicit

Construct a new primitive from shared_ptr to its data.

Definition at line 254 of file Primitive.h.

◆ Primitive() [6/6]

lanelet::Primitive< DerivedConstPrimitive >::Primitive
defaultnoexcept

◆ regulatoryElements()

const RegulatoryElementPtrs& lanelet::Lanelet::regulatoryElements ( )
inline

Return regulatoryElements that affect this lanelet.

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

◆ regulatoryElementsAs()

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

Get the regulatoryElements that could be converted to RegElemT.

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

◆ removeRegulatoryElement()

bool lanelet::Lanelet::removeRegulatoryElement ( const RegulatoryElementPtr regElem)
inline

Removes a regulatory element, returns true on success.

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

◆ rightBound() [1/2]

LineString3d lanelet::Lanelet::rightBound ( )
inline

Get the right bound.

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

◆ rightBound() [2/2]

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

get the right bound.

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

◆ rightBound2d()

LineString2d lanelet::Lanelet::rightBound2d ( )
inline

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

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

◆ rightBound3d()

LineString3d lanelet::Lanelet::rightBound3d ( )
inline

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

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

◆ setCenterline()

void lanelet::Lanelet::setCenterline ( const LineString3d centerline)
inline

Forcefully set a new centerline. Must have a valid Id.

This overrides the default behaviour where the centerline is automatically calculated by the library. The centerline will not be updated if the bounds of the lanelet are modified.

There is no check whether the centerline is actually valid.

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

◆ setLeftBound()

void lanelet::Lanelet::setLeftBound ( const LineString3d bound)
inline

Sets a new left bound and resets the cached centerline.

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

◆ setRightBound()

void lanelet::Lanelet::setRightBound ( const LineString3d bound)
inline

Sets a new right bound and resets the cached centerline.

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

Friends And Related Function Documentation

◆ ConstWeakLanelet

friend class ConstWeakLanelet
friend

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

◆ Primitive

template<typename >
friend class Primitive ( typename  )
friend

Definition at line 280 of file Primitive.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