]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/commitdiff
Add length, wheelbase, width getters to bcar
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Mon, 25 Feb 2019 15:33:33 +0000 (16:33 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Tue, 26 Feb 2019 09:19:53 +0000 (10:19 +0100)
incl/bcar.h
vehicle_platform/bcar.cc

index 85673c8565ab22d4bbe0c160dd0e67af5fbb866f..819d029d7ac1dcc8cac24a94be0fe88a641d5e4d 100644 (file)
@@ -39,6 +39,10 @@ class BicycleCar: public RRTNode {
                 using RRTNode::RRTNode;
 
                 // getter
+                float length();
+                float wheelbase();
+                float width();
+
                 float dr();
                 float df();
 
index a979d80f9c220e87db4174fd01391d73a87bb6b1..f014688296a5ccdf4db283405b455b4bea244b12 100644 (file)
@@ -18,6 +18,22 @@ along with I am car. If not, see <http://www.gnu.org/licenses/>.
 #include <cmath>
 #include "bcar.h"
 
+// getter
+float BicycleCar::length()
+{
+        return this->length_;
+}
+
+float BicycleCar::wheelbase()
+{
+        return this->wheel_base_;
+}
+
+float BicycleCar::width()
+{
+        return this->width_;
+}
+
 float BicycleCar::dr()
 {
         return (this->length_ - this->wheel_base_) / 2;