9 /*! \brief Parking Slot Planner basic class.
11 \param cc Current bicycle car.
12 \param ps Parking slot.
21 /*! \brief Return `true` if there is collision.
23 If the parking slot `ps` collide with current car `cc`,
26 This method depends on `intersection` function that
27 returns `true` or `false` if two line segments collide.
28 Each line segment of current car `cc` (borders) is
29 checked to each line segment of parking slot `ps`
33 /*! \brief Has current car `cc` left?
35 Return `true` if the current car `cc` left the parking
41 /*! \brief Find entry to the parking slot.
44 /*! \brief Find entry to slot by reverse approach.
46 See `Vorobieva2015` for more information.
51 BicycleCar &cc() { return this->cc_; }
52 BicycleCar &gc() { return this->gc_; }
53 ParkingSlot &ps() { return this->ps_; }
58 /*! \brief Return intersection of two line segments.
60 The output is tuple `std::tuple<bool, double, double>`, where the first
61 value is true when there is an intersection and false otherwise. The
62 second and third parameters in the return tuple are coordinates of the
65 \see https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection
67 \param x1 First line segment first `x` coordinate.
68 \param y1 First line segment first `y` coordinate.
69 \param x2 First line segment second `x` coordinate.
70 \param y2 First line segment second `y` coordinate.
71 \param x3 Second line segment first `x` coordinate.
72 \param y3 Second line segment first `y` coordinate.
73 \param x4 Second line segment second `x` coordinate.
74 \param y4 Second line segment second `y` coordinate.
76 std::tuple<bool, double, double> intersect(