From e7e7843e83c1b31c21634dc10c6290c401ed668b Mon Sep 17 00:00:00 2001 From: Sergi Hernandez Juan <shernand@iri.upc.edu> Date: Mon, 15 Mar 2021 19:31:00 +0100 Subject: [PATCH] Added a function to check if an object is a parking slot or not. --- include/opendrive_object.h | 1 + src/opendrive_object.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/include/opendrive_object.h b/include/opendrive_object.h index 8804184..3a0d30f 100644 --- a/include/opendrive_object.h +++ b/include/opendrive_object.h @@ -68,6 +68,7 @@ class COpendriveObject bool is_box(void) const; bool is_cylinder(void) const; bool is_polygon(void) const; + bool is_parking_space(void) const; TOpendriveBox get_box_data(void) const; TOpendriveCylinder get_cylinder_data(void) const; TOpendrivePolygon get_polygon_data(void) const; diff --git a/src/opendrive_object.cpp b/src/opendrive_object.cpp index 48cb8c5..580d41f 100644 --- a/src/opendrive_object.cpp +++ b/src/opendrive_object.cpp @@ -187,6 +187,14 @@ bool COpendriveObject::is_polygon(void) const return false; } +bool COpendriveObject::is_parking_space(void) const +{ + if(this->type=="parkingSpace") + return true; + else + return false; +} + TOpendriveBox COpendriveObject::get_box_data(void) const { TOpendriveBox data; -- GitLab