1 #ifndef LINESEGMENT2D_H 2 #define LINESEGMENT2D_H 43 const double &
x0()
const;
47 const double &
y0()
const;
51 const double &
x1()
const;
55 const double &
y1()
const;
80 const double length()
const;
129 os <<
"[[" << o.
x0() <<
", " << o.
y0() <<
"], [" << o.
x1() <<
", " << o.
y1() <<
"] ]";
135 #endif // LINESEGMENT2D_H std::shared_ptr< LineSegment2D const > LineSegment2DConstPtr
double closestPointLineSegmentRatio(const Point2D &p) const
const double & y1() const
const double & x1() const
bool operator==(const LineSegment2D &o) const
comparison operator
LineSegment2D()
the lines endpoints
const double length() const
const Line2D & line() const
friend std::ostream & operator<<(std::ostream &os, const LineSegment2D &o)
Point2D closestPointTo(const Point2D &p) const
const double & y0() const
double distanceSqrTo(const Point2D &p, double &dx, double &dy) const
const Point2D & p0() const
std::shared_ptr< LineSegment2D > LineSegment2DPtr
Prototype.
double distanceTo(const Point2D &p, double &dx, double &dy) const
const double & x0() const
const Point2D & p1() const