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

Common data management class for all Lanelet-Typed objects. More...

#include <Lanelet.h>

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

Public Member Functions

ConstLineString3d centerline () const
 Returns centerline by computing it, if necessary. Result is cached. More...
 
bool hasCustomCenterline () const
 Returns whether the centerline has been overridden by setCenterline. More...
 
 LaneletData (Id id, LineString3d leftBound, LineString3d rightBound, const AttributeMap &attributes=AttributeMap(), RegulatoryElementPtrs regulatoryElements=RegulatoryElementPtrs())
 Constructs a new, valid LaneletData object. More...
 
const LineString3dleftBound ()
 
const ConstLineString3dleftBound () const
 
CompoundPolygon3d polygon () const
 Get the bounding polygon of this lanelet. Result is cached. More...
 
RegulatoryElementPtrsregulatoryElements ()
 
RegulatoryElementConstPtrs regulatoryElements () const
 
template<typename RegElemT >
std::vector< std::shared_ptr< RegElemT > > regulatoryElementsAs ()
 
template<typename RegElemT >
std::vector< std::shared_ptr< const RegElemT > > regulatoryElementsAs () const
 
void resetCache () const
 call this to indicate that the objects data has been modified. More...
 
const LineString3drightBound ()
 
const ConstLineString3drightBound () const
 
void setCenterline (const LineString3d &centerline)
 Sets a new right bound. Resets all cached data of this object. More...
 
void setLeftBound (const LineString3d &bound)
 Sets a new left bound. Resets all cached data of this object. More...
 
void setRightBound (const LineString3d &bound)
 Sets a new right bound. Resets all cached data of this object. More...
 
- Public Member Functions inherited from lanelet::PrimitiveData
PrimitiveDataoperator= (const PrimitiveData &rhs)=default
 
PrimitiveDataoperator= (PrimitiveData &&rhs) noexcept=default
 
 PrimitiveData () noexcept=default
 
 PrimitiveData (const PrimitiveData &rhs)=default
 
 PrimitiveData (Id id, AttributeMap attributes=AttributeMap())
 Constructs a PrimitiveData object. More...
 
 PrimitiveData (PrimitiveData &&rhs) noexcept=default
 

Private Attributes

std::shared_ptr< ConstLineString3dcenterline_
 
LineString3d leftBound_
 represents the left bound More...
 
RegulatoryElementPtrs regulatoryElements_
 regulatory elements More...
 
LineString3d rightBound_
 represents the right bound More...
 

Additional Inherited Members

- Public Attributes inherited from lanelet::PrimitiveData
AttributeMap attributes
 attributes of this primitive More...
 
Id id {InvalId}
 Id of this primitive (unique across one map) More...
 
- Protected Member Functions inherited from lanelet::PrimitiveData
 ~PrimitiveData ()=default
 

Detailed Description

Common data management class for all Lanelet-Typed objects.

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

Constructor & Destructor Documentation

◆ LaneletData()

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

Constructs a new, valid LaneletData object.

See also
ConstLanelet::ConstLanelet

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

Member Function Documentation

◆ centerline()

ConstLineString3d lanelet::LaneletData::centerline ( ) const

Returns centerline by computing it, if necessary. Result is cached.

<

Todo:
review this (thread safe?)

Definition at line 247 of file Lanelet.cpp.

◆ hasCustomCenterline()

bool lanelet::LaneletData::hasCustomCenterline ( ) const

Returns whether the centerline has been overridden by setCenterline.

Definition at line 275 of file Lanelet.cpp.

◆ leftBound() [1/2]

const LineString3d& lanelet::LaneletData::leftBound ( )
inline

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

◆ leftBound() [2/2]

const ConstLineString3d& lanelet::LaneletData::leftBound ( ) const
inline

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

◆ polygon()

CompoundPolygon3d lanelet::LaneletData::polygon ( ) const

Get the bounding polygon of this lanelet. Result is cached.

Definition at line 280 of file Lanelet.cpp.

◆ regulatoryElements() [1/2]

RegulatoryElementPtrs& lanelet::LaneletData::regulatoryElements ( )
inline

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

◆ regulatoryElements() [2/2]

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

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

◆ regulatoryElementsAs() [1/2]

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

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

◆ regulatoryElementsAs() [2/2]

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

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

◆ resetCache()

void lanelet::LaneletData::resetCache ( ) const

call this to indicate that the objects data has been modified.

Definition at line 284 of file Lanelet.cpp.

◆ rightBound() [1/2]

const LineString3d& lanelet::LaneletData::rightBound ( )
inline

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

◆ rightBound() [2/2]

const ConstLineString3d& lanelet::LaneletData::rightBound ( ) const
inline

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

◆ setCenterline()

void lanelet::LaneletData::setCenterline ( const LineString3d centerline)

Sets a new right bound. Resets all cached data of this object.

Definition at line 271 of file Lanelet.cpp.

◆ setLeftBound()

void lanelet::LaneletData::setLeftBound ( const LineString3d bound)

Sets a new left bound. Resets all cached data of this object.

Definition at line 257 of file Lanelet.cpp.

◆ setRightBound()

void lanelet::LaneletData::setRightBound ( const LineString3d bound)

Sets a new right bound. Resets all cached data of this object.

Definition at line 264 of file Lanelet.cpp.

Member Data Documentation

◆ centerline_

std::shared_ptr<ConstLineString3d> lanelet::LaneletData::centerline_
mutableprivate

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

◆ leftBound_

LineString3d lanelet::LaneletData::leftBound_
private

represents the left bound

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

◆ regulatoryElements_

RegulatoryElementPtrs lanelet::LaneletData::regulatoryElements_
private

regulatory elements

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

◆ rightBound_

LineString3d lanelet::LaneletData::rightBound_
private

represents the right bound

Definition at line 78 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