Go to the documentation of this file.
10 #include "../BasicDatatypes.hpp"
56 Line2D(
float x1,
float y1,
float x2,
float y2)
62 Line2D(
const std::pair<Point2D, Point2D>& p)
187 Point2D* intersectingPoint = NULL)
const;
virtual const UINT32 getUsedMemory() const
double inclination() const
double distanceToPoint(const Point2D &point) const
Returns the distance of the given point to its orthogonal projection onto this line.
IntersectingType
Describes how two lines can be intersecting.
bool isZero() const
Returns true if both points are zero.
IntersectingType isIntersecting(const Line2D &other, Point2D *intersectingPoint=NULL) const
Calculates the intersection point between two lines.
const Point2D & getP2() const
Returns the second point.
Point2D projectOntoLine(const Point2D &point) const
Polygon2D toPolygon2D() const
Conversion to Polygon2D.
Line2D(float x1, float y1, float x2, float y2)
Constructor with x/y coordinates of the two points given explicitly.
Line2D(const Point2D &a, const Point2D &b)
Constructor with two points.
Line2D(const std::pair< Point2D, Point2D > &p)
Constructor from a std::pair.
void setP2(const Point2D &p2)
Sets the second point.
Point2D value_type
Typedef for STL compatibility.
void setP1(const Point2D &p1)
Sets the first point.
static Line2D fromLinearRegression(const Polygon2D &points)
Returns a Line2D from several points using linear regression.
Point2D getDiff() const
Returns the difference between line end and line start as a Point2D.
Point2D second_type
Typedef for STL std::pair compatibility.
Line2D()
Empty constructor.
std::ostream & operator<<(std::ostream &os, const EvalCaseResult &result)
const Point2D & getP1() const
Returns the first point.
double distanceFromLineSegment(const Point2D &point) const
Returns the distance of a point to this line segment.
@ OutsideIntersecting
The lines are intersecting, but outside of their line segments.
Point2D first_type
Typedef for STL std::pair compatibility.
@ NotIntersecting
The lines are not intersecting, i.e. they are parallel or zero.
A line in the two-dimensional plane, composed out of two points.
Line2D getUnitVector() const
Returns a unit vector for this line.
@ LineIntersecting
The lines are intersecting within their line segments.
double getInclination() const
Point2D first
The first point of this line.
Point2D second
The second point of this line.
Point2D getCenterPoint() const
Returns the point in the middle between first and second point.
bool containsPoint(const Point2D &point) const
Returns true if this line "contains" the given point.
libsick_ldmrs
Author(s): SICK AG
, Martin Günther , Jochen Sprickerhof
autogenerated on Wed Oct 26 2022 02:11:57