Harlinn.Windows 0.1
Loading...
Searching...
No Matches
Harlinn::Math::Line< 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::Line< T, N >:
[legend]
Collaboration diagram for Harlinn::Math::Line< T, N >:
[legend]

Public Types

using Point = Math::Point<T, N>
 
using Vector = Math::Vector<T, N>
 
using Simd = LineSimd<T, N>
 
using value_type = T
 
using PointDistanceResult = typename Simd::PointDistanceResult
 
using LineDistanceResult = typename Simd::LineDistanceResult
 

Public Member Functions

 Line () noexcept=default
 
 Line (const Point &o, const Vector &d) noexcept
 
 Line (const Point &p1, const Point &p2) noexcept
 
Simd ToSimd () const noexcept
 
template<PointOrPointSimdType PT>
requires (PT::Size == N)
PointDistanceResult Distance (const PT &point) const noexcept
 Retrieves the closest point and distance to point on the line.
 
LineDistanceResult Distance (const Simd &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.
 

Detailed Description

template<FloatingPointType T, size_t N>
struct Harlinn::Math::Line< 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

◆ LineDistanceResult

template<FloatingPointType T, size_t N>
using Harlinn::Math::Line< T, N >::LineDistanceResult = typename Simd::LineDistanceResult

◆ Point

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

◆ PointDistanceResult

template<FloatingPointType T, size_t N>
using Harlinn::Math::Line< T, N >::PointDistanceResult = typename Simd::PointDistanceResult

◆ Simd

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

◆ value_type

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

◆ Vector

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

Constructor & Destructor Documentation

◆ Line() [1/3]

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

◆ Line() [2/3]

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

◆ Line() [3/3]

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

Member Function Documentation

◆ Distance() [1/3]

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

Retrieves the closest points and shortest distance between two lines.

◆ Distance() [2/3]

template<FloatingPointType T, size_t N>
template<PointOrPointSimdType PT>
requires (PT::Size == N)
PointDistanceResult Harlinn::Math::Line< T, N >::Distance ( const PT & point) const
inlinenoexcept

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

◆ Distance() [3/3]

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

Retrieves the closest points and shortest distance between two lines.

◆ ToSimd()

template<FloatingPointType T, size_t N>
Simd Harlinn::Math::Line< T, N >::ToSimd ( ) const
inlinenoexcept

Member Data Documentation

◆ direction

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

Unit length direction vector.

◆ origin

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

Origin point.


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