]> rtime.felk.cvut.cz Git - hubacji1/bcar.git/commitdiff
Add car frame point and side getters
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Thu, 15 Jul 2021 10:06:42 +0000 (12:06 +0200)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Thu, 15 Jul 2021 14:17:37 +0000 (16:17 +0200)
incl/bcar.hh
src/bcar.cc

index a84053ae6320722d4a89936c5a1397f7d94afca7..ad33a7ddaf4410546fc288390f49b852e04def13 100644 (file)
@@ -320,6 +320,30 @@ public:
        /*! Get frame's right front y coordinate. */
        double rfy() const;
 
+       /*! Get frame's left front point. */
+       Point lf() const;
+
+       /*! Get frame's left rear point. */
+       Point lr() const;
+
+       /*! Get frame's right rear point. */
+       Point rr() const;
+
+       /*! Get frame's right front point. */
+       Point rf() const;
+
+       /*! Get frame's left side. */
+       Line left() const;
+
+       /*! Get frame's rear side. */
+       Line rear() const;
+
+       /*! Get frame's right side. */
+       Line right() const;
+
+       /*! Get frame's front side. */
+       Line front() const;
+
        /*! Get rear axle's left x coordinate. */
        double ralx() const;
 
index 54d30b9ebd40e1912d2ac49e3db1ec885deee151..32b2b8869ded7e6a1ec7ea3dcae717e1198ef43e 100644 (file)
@@ -631,6 +631,54 @@ BicycleCar::rfy() const
        return rfy;
 }
 
+Point
+BicycleCar::lf() const
+{
+       return Point(this->lfx(), this->lfy());
+}
+
+Point
+BicycleCar::lr() const
+{
+       return Point(this->lrx(), this->lry());
+}
+
+Point
+BicycleCar::rr() const
+{
+       return Point(this->rrx(), this->rry());
+}
+
+Point
+BicycleCar::rf() const
+{
+       return Point(this->rfx(), this->rfy());
+}
+
+Line
+BicycleCar::left() const
+{
+       return Line(this->lr(), this->lf());
+}
+
+Line
+BicycleCar::rear() const
+{
+       return Line(this->lr(), this->rr());
+}
+
+Line
+BicycleCar::right() const
+{
+       return Line(this->rr(), this->rf());
+}
+
+Line
+BicycleCar::front() const
+{
+       return Line(this->rf(), this->lf());
+}
+
 double
 BicycleCar::ralx() const
 {