MeshLib C++ Docs
Loading...
Searching...
No Matches

#include <MRMesh/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
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 Lineoperator+ () const
 returns same representation
Line normalized () const
 returns same line represented with unit d-vector
project (const V &x) const
 finds the closest point on line

Public Attributes

p
d

Friends

std::ostream & operator<< (std::ostream &s, const Line &l)
std::istream & operator>> (std::istream &s, Line &l)

(Note that these are not member symbols.)

template<typename V>
Line< V > transformed (const Line< V > &l, const AffineXf< V > &xf)

Detailed Description

template<typename V>
struct MR::Line< V >

2- or 3-dimensional line: cross( x - p, d ) = 0


The documentation for this struct was generated from the following file: