\param L The length of the slot.
*/
ParkingSlot(Point p, double h, double W, double L);
+ ParkingSlot(double lrx, double lry, double rrx, double rry, double rfx,
+ double rfy, double lfx, double lfy);
/*! Get slot's left front x coordinate. */
double lfx() const;
Point(p.x() + W * cos(h - M_PI / 2.0) + L * cos(h),
p.y() + W * sin(h - M_PI / 2.0) + L * sin(h)),
Point(p.x() + L * cos(h), p.y() + L * sin(h))}),
- entry_(p, border_[3]),
- rear_(p, border_[1]),
+ entry_(border_[0], border_[3]),
+ rear_(border_[0], border_[1]),
curb_(border_[1], border_[2]),
front_(border_[2], border_[3])
{
}
+ParkingSlot::ParkingSlot(double lrx, double lry, double rrx, double rry,
+ double rfx, double rfy, double lfx, double lfy) :
+ border_({Point(lrx, lry), Point(rrx, rry),
+ Point(rfx, rfy), Point(lfx, lfy)}),
+ entry_(border_[0], border_[3]),
+ rear_(border_[0], border_[1]),
+ curb_(border_[1], border_[2]),
+ front_(border_[2], border_[3])
+{
+}
+
double
ParkingSlot::lfx() const
{