Harlinn.Windows 0.1
Loading...
Searching...
No Matches
Harlinn::Math::LineSimd< T, N > Struct Template Reference

An infinite line passing through origin<c> with direction given by the unit vector direction<c>. More...

#include <Line.h>

Inheritance diagram for Harlinn::Math::LineSimd< T, N >:
[legend]
Collaboration diagram for Harlinn::Math::LineSimd< T, N >:
[legend]

Classes

class  LineDistanceResult
 Calculates the closest points and shortest distance between two lines. More...
 
class  PointDistanceResult
 Calculates the distance and the closest point on a line from a point. More...
 

Public Types

using Point = typename Math::Point<T, N>::Simd
 
using Vector = Math::Vector<T, N>::Simd
 
using Line = Math::Line<T, N>
 
using value_type = T
 

Public Member Functions

 LineSimd () noexcept=default
 
 LineSimd (const Point &o, const Vector &d) noexcept
 
 LineSimd (const Point &p1, const Point &p2) noexcept
 
 LineSimd (const Line &l) noexcept
 
PointDistanceResult Distance (const Point &point) const noexcept
 Retrieves the closest point and distance to point on the line.
 
LineDistanceResult Distance (const LineSimd &other) const noexcept
 Retrieves the closest points and shortest distance between two lines.
 
LineDistanceResult Distance (const Line &other) const noexcept
 Retrieves the closest points and shortest distance between two lines.
 

Public Attributes

Point origin
 Origin point.
 
Vector direction
 Unit length direction vector.
 

Static Public Attributes

static constexpr value_type Zero = static_cast< value_type >( 0 )
 

Detailed Description

template<FloatingPointType T, size_t N>
struct Harlinn::Math::LineSimd< T, N >

An infinite line passing through origin<c> with direction given by the unit vector direction<c>.

Template Parameters
Tdouble or float
NDimension count.

Member Typedef Documentation

◆ Line

template<FloatingPointType T, size_t N>
using Harlinn::Math::LineSimd< T, N >::Line = Math::Line<T, N>

◆ Point

template<FloatingPointType T, size_t N>
using Harlinn::Math::LineSimd< T, N >::Point = typename Math::Point<T, N>::Simd

◆ value_type

template<FloatingPointType T, size_t N>
using Harlinn::Math::LineSimd< T, N >::value_type = T

◆ Vector

template<FloatingPointType T, size_t N>
using Harlinn::Math::LineSimd< T, N >::Vector = Math::Vector<T, N>::Simd

Constructor & Destructor Documentation

◆ LineSimd() [1/4]

template<FloatingPointType T, size_t N>
Harlinn::Math::LineSimd< T, N >::LineSimd ( )
defaultnoexcept

◆ LineSimd() [2/4]

template<FloatingPointType T, size_t N>
Harlinn::Math::LineSimd< T, N >::LineSimd ( const Point & o,
const Vector & d )
inlinenoexcept

◆ LineSimd() [3/4]

template<FloatingPointType T, size_t N>
Harlinn::Math::LineSimd< T, N >::LineSimd ( const Point & p1,
const Point & p2 )
inlinenoexcept

◆ LineSimd() [4/4]

template<FloatingPointType T, size_t N>
Harlinn::Math::LineSimd< T, N >::LineSimd ( const Line & l)
inlinenoexcept

Member Function Documentation

◆ Distance() [1/3]

template<FloatingPointType T, size_t N>
LineSimd< T, N >::LineDistanceResult Harlinn::Math::LineSimd< T, N >::Distance ( const Line & other) const
noexcept

Retrieves the closest points and shortest distance between two lines.

◆ Distance() [2/3]

template<FloatingPointType T, size_t N>
LineDistanceResult Harlinn::Math::LineSimd< T, N >::Distance ( const LineSimd< T, N > & other) const
inlinenoexcept

Retrieves the closest points and shortest distance between two lines.

◆ Distance() [3/3]

template<FloatingPointType T, size_t N>
PointDistanceResult Harlinn::Math::LineSimd< T, N >::Distance ( const Point & point) const
inlinenoexcept

Retrieves the closest point and distance to point on the line.

Member Data Documentation

◆ direction

template<FloatingPointType T, size_t N>
Vector Harlinn::Math::LineSimd< T, N >::direction

Unit length direction vector.

◆ origin

template<FloatingPointType T, size_t N>
Point Harlinn::Math::LineSimd< T, N >::origin

Origin point.

◆ Zero

template<FloatingPointType T, size_t N>
value_type Harlinn::Math::LineSimd< T, N >::Zero = static_cast< value_type >( 0 )
staticconstexpr

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