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

A const (i.e. immutable) Area. More...

#include <Area.h>

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

Public Types

using Category = traits::AreaTag
 
using ConstType = ConstArea
 
using MutableType = Area
 
using ThreeDType = ConstArea
 
using TwoDType = ConstArea
 
- Public Types inherited from lanelet::ConstPrimitive< AreaData >
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 &regulatoryElements=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...
 
- Public Member Functions inherited from lanelet::ConstPrimitive< AreaData >
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 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 Public Attributes inherited from lanelet::ConstPrimitive< AreaData >
static constexpr bool IsConst
 
- Protected Member Functions inherited from lanelet::ConstPrimitive< AreaData >
 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

A const (i.e. immutable) Area.

Definition at line 114 of file primitives/Area.h.

Member Typedef Documentation

◆ Category

Definition at line 120 of file primitives/Area.h.

◆ ConstType

Definition at line 116 of file primitives/Area.h.

◆ MutableType

Definition at line 117 of file primitives/Area.h.

◆ ThreeDType

Definition at line 119 of file primitives/Area.h.

◆ TwoDType

Definition at line 118 of file primitives/Area.h.

Constructor & Destructor Documentation

◆ ConstArea() [1/3]

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

Constructs an empty or invalid area.

Parameters
idid of this area or InvalId

This construction is only useful for copying.

Definition at line 128 of file primitives/Area.h.

◆ ConstArea() [2/3]

lanelet::ConstArea::ConstArea ( Id  id,
const LineStrings3d outerBound,
const InnerBounds innerBounds = InnerBounds(),
const AttributeMap attributes = AttributeMap(),
const RegulatoryElementPtrs regulatoryElements = RegulatoryElementPtrs() 
)
inline

Constructs a new area.

Parameters
idid of the area
outerBoundouter Boundary of area. Must be in clockwise order.
innerBoundsinner Boundaries of area. Must be in counter-clockwise order.
attributesattributes of this area
regulatoryElementsregulatoryElements 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.

◆ ConstArea() [3/3]

lanelet::ConstArea::ConstArea ( const std::shared_ptr< const AreaData > &  data)
inlineexplicit

Constructor to construct from the data of a different Area.

Definition at line 147 of file primitives/Area.h.

Member Function Documentation

◆ basicPolygonWithHoles2d()

BasicPolygonWithHoles2d lanelet::ConstArea::basicPolygonWithHoles2d ( ) const
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.

◆ basicPolygonWithHoles3d()

BasicPolygonWithHoles3d lanelet::ConstArea::basicPolygonWithHoles3d ( ) const
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.

◆ innerBoundPolygons()

CompoundPolygons3d lanelet::ConstArea::innerBoundPolygons ( ) const
inline

get the inner bounds as polygon

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

◆ innerBounds()

ConstInnerBounds lanelet::ConstArea::innerBounds ( ) const
inline

get the linestrings that form the inner bounds

Definition at line 153 of file primitives/Area.h.

◆ outerBound()

ConstLineStrings3d lanelet::ConstArea::outerBound ( ) const
inline

Get linestrings that form the outer bound.

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

◆ outerBoundPolygon()

CompoundPolygon3d lanelet::ConstArea::outerBoundPolygon ( ) const
inline

get the outer bound as polygon

Returns
the polygon

Definition at line 159 of file primitives/Area.h.

◆ regulatoryElements()

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

get a list of regulatory elements that affect this area

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

◆ regulatoryElementsAs()

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

get the regulatoryElements that could be converted to a type

Returns
the matching regulatory elements, if any
Template Parameters
RegElemTthe 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.


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