9 /*! \brief Parking Slot Planner basic class.
11 \param cc Current bicycle car.
12 \param ps Parking slot.
21 // find entry to slot by reverse approach
23 void fer_perpendicular();
25 /*! \brief Return `true` if there is collision.
27 If the parking slot `ps` collide with current car `cc`,
30 This method depends on `intersection` function that
31 returns `true` or `false` if two line segments collide.
32 Each line segment of current car `cc` (borders) is
33 checked to each line segment of parking slot `ps`
37 /*! \brief Has current car `cc` left?
39 Return `true` if the current car `cc` left the parking
45 /*! \brief Find entry to the parking slot.
48 /*! \brief Find entry to slot by reverse approach.
50 See `Vorobieva2015` for more information.
55 BicycleCar &cc() { return this->cc_; }
56 BicycleCar &gc() { return this->gc_; }
57 ParkingSlot &ps() { return this->ps_; }
62 /*! \brief Return intersection of two line segments.
64 The output is tuple `std::tuple<bool, double, double>`, where the first
65 value is true when there is an intersection and false otherwise. The
66 second and third parameters in the return tuple are coordinates of the
69 \see https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection
71 \param x1 First line segment first `x` coordinate.
72 \param y1 First line segment first `y` coordinate.
73 \param x2 First line segment second `x` coordinate.
74 \param y2 First line segment second `y` coordinate.
75 \param x3 Second line segment first `x` coordinate.
76 \param y3 Second line segment first `y` coordinate.
77 \param x4 Second line segment second `x` coordinate.
78 \param y4 Second line segment second `y` coordinate.
80 std::tuple<bool, double, double> intersect(