The blo Library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
blo::ParametricLine< T, N > Class Template Reference

Parametric form of n-dimensional line. More...

#include <ParametricLine.h>

Public Member Functions

 ParametricLine ()=default
 Default constructor.
 
 ParametricLine (const Point< T, N > &X0, const SmallMatrix< T, N, 1 > &v)
 Constructs and sets parametric form of line.
 
 ParametricLine (const Point< T, N > &X0, const Point< T, N > &X1)
 Constructs and sets parametric form of line.
 
 ParametricLine (const ParametricLine &rhs)=default
 Copy constructor.
 
 ~ParametricLine ()=default
 Destructor.
 
ParametricLine & operator= (const ParametricLine &rhs)=default
 Assignment operator.
 
void set (const Point< T, N > &X0, const SmallMatrix< T, N, 1 > &v)
 Sets parametric form of line.
 
void set (const Point< T, N > &X0, const Point< T, N > &X1)
 Sets parametric form of line.
 
const Point< T, N > point () const
 Retrieves point the line passes through.
 
const SmallMatrix< T, N, 1 > vector () const
 Retrieves vector parallel to the line.
 
const Point< T, N > pointOnLine (const T &lambda) const
 Calculates a parameterized point on the line.
 
const T parameterOfPointOnLine (const Point< T, N > &X) const
 Calculates the parameter of a point on the line.
 

Detailed Description

template<typename T, size_t N>
class blo::ParametricLine< T, N >

Parametric form of n-dimensional line.

Template Parameters
TData type.
NNumber of dimensions.

Constructor & Destructor Documentation

◆ ParametricLine() [1/4]

template<typename T , size_t N>
blo::ParametricLine< T, N >::ParametricLine ( )
default

Default constructor.

◆ ParametricLine() [2/4]

template<typename T , size_t N>
blo::ParametricLine< T, N >::ParametricLine ( const Point< T, N > &  X0,
const SmallMatrix< T, N, 1 > &  v 
)

Constructs and sets parametric form of line.

X = X0 + lambda * v

Parameters
X0The point the line passes through.
vThe vector parallel to the line.

◆ ParametricLine() [3/4]

template<typename T , size_t N>
blo::ParametricLine< T, N >::ParametricLine ( const Point< T, N > &  X0,
const Point< T, N > &  X1 
)

Constructs and sets parametric form of line.

X = X0 + lambda * v, where v = X1 - X0

Parameters
X0The first point the line passes through.
X1The second point the line passes through.

◆ ParametricLine() [4/4]

template<typename T , size_t N>
blo::ParametricLine< T, N >::ParametricLine ( const ParametricLine< T, N > &  rhs)
default

Copy constructor.

◆ ~ParametricLine()

template<typename T , size_t N>
blo::ParametricLine< T, N >::~ParametricLine ( )
default

Destructor.

Member Function Documentation

◆ operator=()

template<typename T , size_t N>
ParametricLine & blo::ParametricLine< T, N >::operator= ( const ParametricLine< T, N > &  rhs)
default

Assignment operator.

◆ parameterOfPointOnLine()

template<typename T , size_t N>
const T blo::ParametricLine< T, N >::parameterOfPointOnLine ( const Point< T, N > &  X) const

Calculates the parameter of a point on the line.

X = X0 + lambda * v

Note
The function does not check to ensure that the specified point lies on the line.
Parameters
XThe point on the line.
Returns
The parameter lambda.

◆ point()

template<typename T , size_t N>
const Point< T, N > blo::ParametricLine< T, N >::point ( ) const

Retrieves point the line passes through.

X = X0 + lambda * v

Returns
The point X0 the line passes through.

◆ pointOnLine()

template<typename T , size_t N>
const Point< T, N > blo::ParametricLine< T, N >::pointOnLine ( const T &  lambda) const

Calculates a parameterized point on the line.

X = X0 + lambda * v

Parameters
lambdaThe parameter.
Returns
The point X on the line.

◆ set() [1/2]

template<typename T , size_t N>
void blo::ParametricLine< T, N >::set ( const Point< T, N > &  X0,
const Point< T, N > &  X1 
)

Sets parametric form of line.

X = X0 + lambda * v, where v = X1 - X0

Parameters
X0The first point the line passes through.
X1The second point the line passes through.

◆ set() [2/2]

template<typename T , size_t N>
void blo::ParametricLine< T, N >::set ( const Point< T, N > &  X0,
const SmallMatrix< T, N, 1 > &  v 
)

Sets parametric form of line.

X = X0 + lambda * v

Parameters
X0The point the line passes through.
vThe vector parallel to the line.

◆ vector()

template<typename T , size_t N>
const SmallMatrix< T, N, 1 > blo::ParametricLine< T, N >::vector ( ) const

Retrieves vector parallel to the line.

X = X0 + lambda * v

Returns
The vector v parallel to the line.

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