modm API documentation
modm::Line2D< T > Class Template Reference

Line. More...

`#include <modm/math/geometry/line_2d.hpp>`

## Public Typedefs

typedef GeometricTraits< T >::WideType WideType

typedef GeometricTraits< T >::FloatType FloatType

## Public Member Functions

Line2D ()
Default-Constructor.

Line2D (const Vector< T, 2 > &point, const Vector< T, 2 > &directionVector)
Construct a line. More...

void setPoint (const Vector< T, 2 > &point)

const Vector< T, 2 > & getPoint () const

void setDirectionVector (const Vector< T, 2 > &vector)

const Vector< T, 2 > & getDirectionVector () const

void set (const Vector< T, 2 > &point, const Vector< T, 2 > &directionVector)

getDistanceTo (const Vector< T, 2 > &point) const
Shortest distance to a point.

bool getIntersections (const Line2D &other, PointSet2D< T > &intersections) const
Calculate intersection point(s) More...

bool getIntersections (const Circle2D< T > &circle, PointSet2D< T > &intersections) const
Calculate intersection point(s) More...

## Protected Attributes

Vector< T, 2 > point

Vector< T, 2 > directionVector

Line.

## Constructor & Destructor Documentation

template<typename T >
 modm::Line2D< T >::Line2D ( const Vector< T, 2 > & point, const Vector< T, 2 > & directionVector )

Construct a line.

Parameters
 point a point on the line directionVector direction vector, the length doesn't matter

## Member Function Documentation

template<typename T >
 bool modm::Line2D< T >::getIntersections ( const Circle2D< T > & circle, PointSet2D< T > & intersections ) const

Calculate intersection point(s)

Parameters
 [in] circle A circle [out] intersections Intersection points
http://local.wasp.uwa.edu.au/~pbourke/geometry/sphereline/
template<typename T >
 bool modm::Line2D< T >::getIntersections ( const Line2D< T > & other, PointSet2D< T > & intersections ) const

Calculate intersection point(s)

Parameters
 [in] other Other line [out] intersections Intersection point

The documentation for this class was generated from the following files:
• circle_2d.hpp
• line_2d.hpp