#include <MRLine.h>
| Public Types | |
| using | T = typename V::ValueType | 
| Public Member Functions | |
| constexpr | Line () noexcept=default | 
| constexpr | Line (const V &p, const V &d) noexcept | 
| template<typename U > | |
| constexpr | Line (const Line< U > &l) noexcept | 
| V | operator() (T param) const | 
| returns point on the line, where param=0 returns p and param=1 returns p+d | |
| T | distanceSq (const V &x) const | 
| returns squared distance from given point to this line | |
| Line | operator- () const | 
| returns same line represented with flipped direction of d-vector | |
| const Line & | operator+ () const | 
| returns same representation | |
| Line | normalized () const | 
| returns same line represented with unit d-vector | |
| V | project (const V &x) const | 
| finds the closest point on line | |
| Public Attributes | |
| V | p | 
| V | d | 
| Related Symbols | |
| (Note that these are not member symbols.) | |
| template<typename V > | |
| Line< V > | transformed (const Line< V > &l, const AffineXf< V > &xf) | 
2- or 3-dimensional line: cross( x - p, d ) = 0
| using MR::Line< V >::T = typename V::ValueType | 
| 
 | constexprdefaultnoexcept | 
| 
 | inlineconstexprnoexcept | 
| 
 | inlineexplicitconstexprnoexcept | 
returns squared distance from given point to this line
returns same line represented with unit d-vector
returns point on the line, where param=0 returns p and param=1 returns p+d
returns same representation
returns same line represented with flipped direction of d-vector
| 
 | inlinenodiscard | 
finds the closest point on line
| 
 | related | 
given line: l(x) = 0, and transformation: y=xf(x);
if given transformation is not rigid, then it is a good idea to normalize returned line
| V MR::Line< V >::d | 
| V MR::Line< V >::p |