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 fe_perpendicular();
25 void fer_perpendicular();
27 /*! \brief Return `true` if there is collision.
29 If the parking slot `ps` collide with current car `cc`,
32 This method depends on `intersection` function that
33 returns `true` or `false` if two line segments collide.
34 Each line segment of current car `cc` (borders) is
35 checked to each line segment of parking slot `ps`
39 /*! \brief Return parking direction
41 Return `true` if the direction of the parking in the
45 /*! \brief Has current car `cc` left?
47 Return `true` if the current car `cc` left the parking
53 /*! \brief Find entry to the parking slot.
56 /*! \brief Find entry to slot by reverse approach.
58 See `Vorobieva2015` for more information.
63 BicycleCar &cc() { return this->cc_; }
64 BicycleCar &gc() { return this->gc_; }
65 ParkingSlot &ps() { return this->ps_; }
70 /*! \brief Return intersection of two line segments.
72 The output is tuple `std::tuple<bool, double, double>`, where the first
73 value is true when there is an intersection and false otherwise. The
74 second and third parameters in the return tuple are coordinates of the
77 \see https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection
79 \param x1 First line segment first `x` coordinate.
80 \param y1 First line segment first `y` coordinate.
81 \param x2 First line segment second `x` coordinate.
82 \param y2 First line segment second `y` coordinate.
83 \param x3 Second line segment first `x` coordinate.
84 \param y3 Second line segment first `y` coordinate.
85 \param x4 Second line segment second `x` coordinate.
86 \param y4 Second line segment second `y` coordinate.
88 std::tuple<bool, double, double> intersect(