10 /*! \brief Parking slot basic class.
12 * This class contains some geometrical computations of parking slot. Parking
13 * slot consists of 4 cartesian coordinates `border` representing the border of
24 /*! \brief Set parking slot.
26 \param p Point with `x`, `y` coordinates of entry side's corner.
27 \param h Direction of the entry side.
28 \param W The width of the slot.
29 \param L The length of the slot.
31 ParkingSlot(Point p, double h, double W, double L);
32 ParkingSlot(double lrx, double lry, double rrx, double rry, double rfx,
33 double rfy, double lfx, double lfy);
35 /*! Get slot's length. */
38 /*! Get slot's width. */
41 /*! Get slot's left front x coordinate. */
44 /*! Get slot's left front y coordinate. */
47 /*! Get slot's left rear x coordinate. */
50 /*! Get slot's left rear y coordinate. */
53 /*! Get slot's right rear x coordinate. */
56 /*! Get slot's right rear y coordinate. */
59 /*! Get slot's right front x coordinate. */
62 /*! Get slot's right front y coordinate. */
65 /*! Return parking slot's orientation. */
68 /*! Return `true` for the parallel parking slot. */
69 bool parallel() const;
71 /*! Return `true` for the parking slot on the right side. */
74 /*! Change side of the parking slot. */
77 /*! Return `true` if car `c` is parking in slot `this`. */
78 bool parked(BicycleCar const& c) const;
80 /*! Return `true` if `c`'s car frame collide with `this` border. */
81 bool collide(BicycleCar const& c) const;
83 friend std::ostream& operator<<(std::ostream& o, ParkingSlot const& s);
87 #endif /* BCAR_PSLOT_H */