Class ConstArea
Defined in File Area.h
Inheritance Relationships
Base Type
public lanelet::ConstPrimitive< AreaData >
(Template Class ConstPrimitive)
Derived Type
public lanelet::Primitive< ConstArea >
(Template Class Primitive)
Class Documentation
-
class ConstArea : public lanelet::ConstPrimitive<AreaData>
A const (i.e. immutable) Area.
Subclassed by lanelet::Primitive< ConstArea >
Public Types
Public Functions
-
inline explicit ConstArea(Id id = InvalId)
Constructs an empty or invalid area.
This construction is only useful for copying.
- Parameters:
id – id of this area or InvalId
-
inline ConstArea(Id id, const LineStrings3d &outerBound, const InnerBounds &innerBounds = InnerBounds(), const AttributeMap &attributes = AttributeMap(), const RegulatoryElementPtrs ®ulatoryElements = RegulatoryElementPtrs())
Constructs a new area.
This is the constructor that you most probably want to use.
- Parameters:
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
Constructor to construct from the data of a different Area.
-
inline ConstLineStrings3d outerBound() const
Get linestrings that form the outer bound.
-
inline ConstInnerBounds innerBounds() const
get the linestrings that form the inner bounds
-
inline CompoundPolygon3d outerBoundPolygon() const
get the outer bound as polygon
- Returns:
the polygon
-
inline CompoundPolygons3d innerBoundPolygons() const
get the inner bounds as polygon
-
inline BasicPolygonWithHoles3d basicPolygonWithHoles3d() const
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.
-
inline BasicPolygonWithHoles2d basicPolygonWithHoles2d() const
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.
-
inline RegulatoryElementConstPtrs regulatoryElements() const
get a list of regulatory elements that affect this area
get the regulatoryElements that could be converted to a type
E.g. regulatoryElementsAs<TrafficLight>() will return all regulatory elements that are traffic lights.
- Template Parameters:
RegElemT – the type to covert to without cv qualifiers
- Returns:
the matching regulatory elements, if any
-
inline explicit ConstArea(Id id = InvalId)