4 /*! \brief Parking slot basic class.
6 This class contains some geometrical computations of parking slot. Parking slot
7 consists of 4 cartesian coordinates `border` representing the border of the
10 \param border Array of 4 `x`, `y` values - the borderd of the parking slot.
14 double border_[4][2] = {
22 double x1() const { return this->border_[0][0]; }
23 double y1() const { return this->border_[0][1]; }
24 double x2() const { return this->border_[1][0]; }
25 double y2() const { return this->border_[1][1]; }
26 double x3() const { return this->border_[2][0]; }
27 double y3() const { return this->border_[2][1]; }
28 double x4() const { return this->border_[3][0]; }
29 double y4() const { return this->border_[3][1]; }
30 /*! \brief Set parking slot border.
32 \param x1 First `x` coordinate.
33 \param y1 First `y` coordinate.
34 \param x2 Second `x` coordinate.
35 \param y2 Second `y` coordinate.
36 \param x3 Third `x` coordinate.
37 \param y3 Third `y` coordinate.
38 \param x4 The last (fourth) `x` coordinate.
39 \param y4 The last (fourth) `y` coordinate.
47 this->border_[0][0] = x1;
48 this->border_[0][1] = y1;
49 this->border_[1][0] = x2;
50 this->border_[1][1] = y2;
51 this->border_[2][0] = x3;
52 this->border_[2][1] = y3;
53 this->border_[3][0] = x4;
54 this->border_[3][1] = y4;