]> rtime.felk.cvut.cz Git - hubacji1/bcar.git/commitdiff
Add length and width getter to parking slot
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Thu, 15 Jul 2021 09:45:39 +0000 (11:45 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Thu, 15 Jul 2021 14:17:37 +0000 (16:17 +0200)
incl/pslot.hh
src/pslot.cc

index 56a6f1619e447f2302f956ffb19eeb1c8dc6ff00..50f17ef6c7bc31c418bbc244595029a8a16a0289 100644 (file)
@@ -32,6 +32,12 @@ public:
        ParkingSlot(double lrx, double lry, double rrx, double rry, double rfx,
                double rfy, double lfx, double lfy);
 
+       /*! Get slot's length. */
+       double len() const;
+
+       /*! Get slot's width. */
+       double w() const;
+
        /*! Get slot's left front x coordinate. */
        double lfx() const;
 
index 8cf1ad950e5ab70bd93a772e2c38c69603ca5d5d..2246b5253e27e410156bac649d1319fb11badcaa 100644 (file)
@@ -29,6 +29,18 @@ ParkingSlot::ParkingSlot(double lrx, double lry, double rrx, double rry,
 {
 }
 
+double
+ParkingSlot::len() const
+{
+       return this->entry_.len();
+}
+
+double
+ParkingSlot::w() const
+{
+       return this->rear_.len();
+}
+
 double
 ParkingSlot::lfx() const
 {