An immutable lanelet. More...
#include <Lanelet.h>
Public Types | |
using | Category = traits::LaneletTag |
using | ConstType = ConstLanelet |
using | MutableType = Lanelet |
using | ThreeDType = ConstLanelet |
using | TwoDType = ConstLanelet |
![]() | |
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 ®ulatoryElements=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... | |
![]() | |
const Attribute & | attribute (AttributeName name) const |
retrieve an attribute (enum version) More... | |
const Attribute & | attribute (const std::string &name) const |
retrieve an attribute More... | |
T | attributeOr (AttributeName name, T defaultVal) const |
retrieve an attribute (enum version) More... | |
T | attributeOr (const std::string &name, T defaultVal) const noexcept |
retrieve an attribute (string version) More... | |
const AttributeMap & | attributes () 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 constexpr bool | IsConst |
![]() | |
ConstPrimitive (const ConstPrimitive &rhs)=default | |
ConstPrimitive (ConstPrimitive &&rhs) noexcept=default | |
ConstPrimitive & | operator= (const ConstPrimitive &rhs)=default |
ConstPrimitive & | operator= (ConstPrimitive &&rhs) noexcept=default |
~ConstPrimitive () noexcept=default | |
An immutable lanelet.
Definition at line 131 of file primitives/Lanelet.h.
Definition at line 137 of file primitives/Lanelet.h.
Definition at line 133 of file primitives/Lanelet.h.
Definition at line 134 of file primitives/Lanelet.h.
Definition at line 136 of file primitives/Lanelet.h.
Definition at line 135 of file primitives/Lanelet.h.
Constructs an empty or invalid lanelet.
Definition at line 140 of file primitives/Lanelet.h.
|
inline |
Constructs a lanelet from id, attributes, regulatoryElements and bounds.
Definition at line 144 of file primitives/Lanelet.h.
|
inlineexplicit |
Construct from the data of a different Lanelet.
Definition at line 150 of file primitives/Lanelet.h.
|
inline |
get the (cached) centerline of this lanelet.
Definition at line 187 of file primitives/Lanelet.h.
|
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.
|
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.
|
inline |
Returns whether the centerline has been overridden by setCenterline.
Definition at line 198 of file primitives/Lanelet.h.
|
inline |
returns the inverted lanelet
Definition at line 157 of file primitives/Lanelet.h.
|
inline |
returns if this is an inverted lanelet
Definition at line 154 of file primitives/Lanelet.h.
|
inline |
get the left bound.
Definition at line 160 of file primitives/Lanelet.h.
|
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.
|
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.
CompoundPolygon2d lanelet::ConstLanelet::polygon2d | ( | ) | const |
returns the surface covered by this lanelet as 2-dimensional polygon.
Definition at line 316 of file Lanelet.cpp.
CompoundPolygon3d lanelet::ConstLanelet::polygon3d | ( | ) | const |
returns the surface covered by this lanelet as 3-dimensional polygon.
Definition at line 314 of file Lanelet.cpp.
|
inline |
get a list of regulatory elements that affect this lanelet
Definition at line 178 of file primitives/Lanelet.h.
|
inline |
get the regulatoryElements that could be converted to RegElemT
Definition at line 182 of file primitives/Lanelet.h.
|
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.
|
inline |
get the right bound.
Definition at line 169 of file primitives/Lanelet.h.
|
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.
|
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.
|
private |
indicates if this lanelet is inverted
Definition at line 215 of file primitives/Lanelet.h.