A const (i.e. immutable) Area. More...
#include <Area.h>
Public Types | |
using | Category = traits::AreaTag |
using | ConstType = ConstArea |
using | MutableType = Area |
using | ThreeDType = ConstArea |
using | TwoDType = ConstArea |
![]() | |
using | DataType = AreaData |
Public Member Functions | |
BasicPolygonWithHoles2d | basicPolygonWithHoles2d () const |
generates a basic polygon in 2d with holes for this area More... | |
BasicPolygonWithHoles3d | basicPolygonWithHoles3d () const |
generates a basic polygon in 2d with holes for this area More... | |
ConstArea (const std::shared_ptr< const AreaData > &data) | |
Constructor to construct from the data of a different Area. More... | |
ConstArea (Id id, const LineStrings3d &outerBound, const InnerBounds &innerBounds=InnerBounds(), const AttributeMap &attributes=AttributeMap(), const RegulatoryElementPtrs ®ulatoryElements=RegulatoryElementPtrs()) | |
Constructs a new area. More... | |
ConstArea (Id id=InvalId) | |
Constructs an empty or invalid area. More... | |
CompoundPolygons3d | innerBoundPolygons () const |
get the inner bounds as polygon More... | |
ConstInnerBounds | innerBounds () const |
get the linestrings that form the inner bounds More... | |
ConstLineStrings3d | outerBound () const |
Get linestrings that form the outer bound. More... | |
CompoundPolygon3d | outerBoundPolygon () const |
get the outer bound as polygon More... | |
RegulatoryElementConstPtrs | regulatoryElements () const |
get a list of regulatory elements that affect this area More... | |
template<typename RegElemT > | |
std::vector< std::shared_ptr< const RegElemT > > | regulatoryElementsAs () const |
get the regulatoryElements that could be converted to a type 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 AreaData > & | constData () const |
get the internal data of this primitive More... | |
ConstPrimitive (const std::shared_ptr< const AreaData > &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 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 | |
A const (i.e. immutable) Area.
Definition at line 114 of file primitives/Area.h.
Definition at line 120 of file primitives/Area.h.
Definition at line 116 of file primitives/Area.h.
using lanelet::ConstArea::MutableType = Area |
Definition at line 117 of file primitives/Area.h.
Definition at line 119 of file primitives/Area.h.
Definition at line 118 of file primitives/Area.h.
Constructs an empty or invalid area.
id | id of this area or InvalId |
This construction is only useful for copying.
Definition at line 128 of file primitives/Area.h.
|
inline |
Constructs a new area.
id | id of the area |
outerBound | outer Boundary of area. Must be in clockwise order. |
innerBounds | inner Boundaries of area. Must be in counter-clockwise order. |
attributes | attributes of this area |
regulatoryElements | regulatoryElements that apply to this area |
This is the constructor that you most probably want to use.
Definition at line 141 of file primitives/Area.h.
|
inlineexplicit |
Constructor to construct from the data of a different Area.
Definition at line 147 of file primitives/Area.h.
|
inline |
generates a basic polygon in 2d with holes for this area
The generated polygon only has the points, no ids or attributes. It is thought for geometry calculations.
Definition at line 181 of file primitives/Area.h.
|
inline |
generates a basic polygon in 2d with holes for this area
The generated polygon only has the points, no ids or attributes. It is thought for geometry calculations.
Definition at line 170 of file primitives/Area.h.
|
inline |
get the inner bounds as polygon
Definition at line 162 of file primitives/Area.h.
|
inline |
get the linestrings that form the inner bounds
Definition at line 153 of file primitives/Area.h.
|
inline |
Get linestrings that form the outer bound.
Definition at line 150 of file primitives/Area.h.
|
inline |
|
inline |
get a list of regulatory elements that affect this area
Definition at line 187 of file primitives/Area.h.
|
inline |
get the regulatoryElements that could be converted to a type
RegElemT | the type to covert to without cv qualifiers |
E.g. regulatoryElementsAs<TrafficLight>() will return all regulatory elements that are traffic lights.
Definition at line 198 of file primitives/Area.h.