Go to the documentation of this file.
2 #pragma GCC diagnostic push
3 #if defined __GNUC__ && (__GNUC__ >= 6)
4 #pragma GCC diagnostic ignored "-Wignored-attributes"
5 #pragma GCC diagnostic ignored "-Wint-in-bool-context"
8 #pragma GCC diagnostic pop
20 using BasicPoint2d = Eigen::Matrix<double, 2, 1, Eigen::DontAlign>;
22 Eigen::aligned_allocator<Eigen::Vector2d>>;
29 template <
typename InType>
31 return t.basicPoint2d();
89 return {primitive.x(), primitive.y(), 0};
93 return {primitive.x(), primitive.y()};
189 double x() const noexcept {
return point().x(); }
192 double y() const noexcept {
return point().y(); }
224 double z() const noexcept {
return point().z(); }
247 return point().head<2>();
257 double&
x() noexcept {
return point().x(); }
260 double&
y() noexcept {
return point().y(); }
261 double z() const noexcept = delete;
303 double&
x() noexcept {
return point().x(); }
306 double&
y() noexcept {
return point().y(); }
309 double&
z() noexcept {
return point().z(); }
313 return stream <<
"[id: " << obj.
id() <<
" x: " << obj.
x() <<
" y: " << obj.
y() <<
"]";
317 return stream <<
"[id: " << obj.
id() <<
" x: " << obj.
x() <<
" y: " << obj.
y() <<
" z: " << obj.
z() <<
"]";
321 return stream <<
"[id: " << obj.
id() <<
" x: " << obj.
x() <<
" y: " << obj.
y() <<
"]";
325 return stream <<
"[id: " << obj.
id() <<
" x: " << obj.
x() <<
" y: " << obj.
y() <<
" z: " << obj.
z() <<
"]";
329 template <
typename T>
331 return isCategory<T, traits::PointTag>();
334 template <
typename T,
typename RetT>
335 using IfPT = std::enable_if_t<traits::isPointT<T>(), RetT>;
constexpr Id InvalId
indicates a primitive that is not part of a map
Base class for all mutable Primitives of lanelet2.
double length
length along linestring
double & x() noexcept
gets a mutable reference to the x coordinate
double & y() noexcept
gets a mutable reference to the y coordinate
const BasicPoint3d & point() const
ConstPoint3d(const ConstPoint2d &other)
std::vector< BasicPoint3d > BasicPoints3d
multiple simple 3d-points
double & z() noexcept
gets a mutable reference to the z coordinate
typename T::ConstType ConstType
constexpr bool isPointT()
Common data class for all lanelet primitives.
Point3d(const Point2d &other)
constructs a 3D from a 2D point. No data is lost in that process.
const BasicPoint2d & basicPoint() const noexcept
get a basic 2d point
BoundingBox2d to2D(const BoundingBox3d &primitive)
Eigen::Vector3d BasicPoint3d
a simple 3d-point
const AttributeMap & attributes() const
get the attributes of this primitive
ConstPoint2d(Id id=InvalId, double x=0., double y=0., double z=0., const AttributeMap &attributes=AttributeMap())
Construct from an id and coordinates.
HybridMap< Attribute, decltype(AttributeNamesString::Map)&, AttributeNamesString::Map > AttributeMap
static constexpr traits::Dimensions Dimension
static constexpr bool IsPrimitive
std::ostream & operator<<(std::ostream &stream, const Attribute &obj)
const BasicPoint & basicPoint() const noexcept
get a basic 3d point
double z() const noexcept
get the z coordinate
typename PrimitiveTraits< BasicPoint2d >::ConstType ConstPoint
double z() const noexcept=delete
const BasicPoint2d & point2d() const
double distance
signed distance to linestring (left=positive)
Describes a position in linestring coordinates.
typename PrimitiveTraits< BasicPoint3d >::ConstType ConstPoint
const BasicPoint2d & basicPoint2d() const noexcept
const BasicPoint2d & point2d() const
const BasicPoint2d & convert(const InType &t) const
std::enable_if_t< traits::isPointT< T >(), RetT > IfPT
const std::shared_ptr< const PointData > & constData() const
get the internal data of this primitive
typename PrimitiveTraits< BasicPoint2d >::MutableType MutablePoint
typename T::MutableType MutableType
AttributeMap attributes
attributes of this primitive
static constexpr traits::Dimensions Dimension
double & x() noexcept
gets a mutable reference to the x coordinate
typename PrimitiveTraits< BasicPoint2d >::MutableType MutablePoint
BasicPoint2d BasicPoint
returned basic point type
Eigen::Matrix< double, 2, 1, Eigen::DontAlign > BasicPoint2d
a simple 2d-point
double x() const noexcept
gets x coordinate
BasicPoint & basicPoint() noexcept
Get a mutable reference to the internal 3d point.
double & y() noexcept
gets a mutable reference to the y coordinate
ConstPrimitive(const std::shared_ptr< const Data > &data)
Construct from a pointer to the data.
Basic Primitive class for all primitives of lanelet2.
PointData & operator=(const LineStringData &)=delete
ConstPoint2d(Id id, const BasicPoint3d &point, const AttributeMap &attributes=AttributeMap())
Construct from an id and a point.
static constexpr traits::Dimensions Dimension
typename PrimitiveTraits< BasicPoint2d >::ConstType ConstPoint
static constexpr traits::Dimensions Dimension
double y() const noexcept
gets y coordinate
static constexpr Dimensions Dimension
Specialization of traits for points.
Id id
Id of this primitive (unique across one map)
Identifies RegulatoryElementPrimitives.
std::shared_ptr< DataType > data() const
const BasicPoint & basicPoint() const noexcept
Get an Eigen point for faster calculations.
const BasicPoint & basicPoint() const noexcept
Get an immutable reference to the internal 3d point.
Id id() const noexcept
get the unique id of this primitive
typename PrimitiveTraits< BasicPoint3d >::MutableType MutablePoint
auto basicPoint() noexcept
get a mutable reference to the 2d point data
std::vector< Eigen::Vector2d, Eigen::aligned_allocator< Eigen::Vector2d > > BasicPoints2d
multiple simple 2d-points
BoundingBox3d to3D(const BoundingBox2d &primitive)
PointData(Id id, BasicPoint3d point, const AttributeMap &attributes=AttributeMap())
lanelet2_core
Author(s): Fabian Poggenhans
autogenerated on Thu Mar 6 2025 03:25:52