Fishnet 2.0.1
Framework for Graph-Based Analysis of GIS Vector Data
Loading...
Searching...
No Matches
fishnet::geometry::Ray< T > Class Template Reference

Implementation of a ray A ray consist of an origin and the direction of the ray. More...

#include <Ray.hpp>

Public Types

using numeric_type = T
 

Public Member Functions

constexpr Ray (Vec2D< T > origin, Vec2D< T > direction)
 
template<fishnet::math::Number U, typename = std::enable_if_t<!std::is_same_v<U,T> && std::is_same_v<T,fishnet::math::DEFAULT_NUMERIC>>>
constexpr Ray (Vec2D< T > origin, Vec2D< U > direction)
 
template<fishnet::math::Number U, typename = std::enable_if_t<!std::is_same_v<U,T> && std::is_same_v<T,fishnet::math::DEFAULT_NUMERIC>>>
constexpr Ray (Vec2D< U > origin, Vec2D< T > direction)
 
constexpr Vec2D< T > direction () const noexcept
 
constexpr Vec2D< T > origin () const noexcept
 
constexpr Line< T > toLine () const noexcept
 
constexpr Ray< T > oppositeRay () const noexcept
 
constexpr Ray< T > operator- () const
 
constexpr bool isParallel (LinearGeometry auto const &other) const noexcept
 
constexpr bool intersects (LinearGeometry auto const &other) const noexcept
 
constexpr bool contains (IPoint auto const &point) const noexcept
 
template<fishnet::math::Number U>
constexpr bool operator== (const Ray< U > &other) const noexcept
 
constexpr std::optional< Vec2DReal > intersection (LinearGeometry auto const &other) const noexcept
 
constexpr size_t hash () const noexcept
 
constexpr std::string toString () const
 

Static Public Member Functions

static constexpr Ray< T > up (Vec2D< T > origin) noexcept
 
static constexpr Ray< T > down (Vec2D< T > origin) noexcept
 
static constexpr Ray< T > right (Vec2D< T > origin) noexcept
 
static constexpr Ray< T > left (Vec2D< T > origin) noexcept
 

Static Public Attributes

static constexpr GeometryType type = GeometryType::RAY
 

Detailed Description

template<fishnet::math::Number T>
class fishnet::geometry::Ray< T >

Implementation of a ray A ray consist of an origin and the direction of the ray.

Template Parameters
Tnumeric type used for computations

Member Typedef Documentation

◆ numeric_type

template<fishnet::math::Number T>
using fishnet::geometry::Ray< T >::numeric_type = T

Constructor & Destructor Documentation

◆ Ray() [1/3]

template<fishnet::math::Number T>
constexpr fishnet::geometry::Ray< T >::Ray ( Vec2D< T >  origin,
Vec2D< T >  direction 
)
inlineconstexpr

◆ Ray() [2/3]

template<fishnet::math::Number T>
template<fishnet::math::Number U, typename = std::enable_if_t<!std::is_same_v<U,T> && std::is_same_v<T,fishnet::math::DEFAULT_NUMERIC>>>
constexpr fishnet::geometry::Ray< T >::Ray ( Vec2D< T >  origin,
Vec2D< U >  direction 
)
inlineconstexpr

◆ Ray() [3/3]

template<fishnet::math::Number T>
template<fishnet::math::Number U, typename = std::enable_if_t<!std::is_same_v<U,T> && std::is_same_v<T,fishnet::math::DEFAULT_NUMERIC>>>
constexpr fishnet::geometry::Ray< T >::Ray ( Vec2D< U >  origin,
Vec2D< T >  direction 
)
inlineconstexpr

Member Function Documentation

◆ contains()

template<fishnet::math::Number T>
constexpr bool fishnet::geometry::Ray< T >::contains ( IPoint auto const &  point) const
inlineconstexprnoexcept

◆ direction()

template<fishnet::math::Number T>
constexpr Vec2D< T > fishnet::geometry::Ray< T >::direction ( ) const
inlineconstexprnoexcept

◆ down()

template<fishnet::math::Number T>
static constexpr Ray< T > fishnet::geometry::Ray< T >::down ( Vec2D< T >  origin)
inlinestaticconstexprnoexcept

◆ hash()

template<fishnet::math::Number T>
constexpr size_t fishnet::geometry::Ray< T >::hash ( ) const
inlineconstexprnoexcept

◆ intersection()

template<fishnet::math::Number T>
constexpr std::optional< Vec2DReal > fishnet::geometry::Ray< T >::intersection ( LinearGeometry auto const &  other) const
inlineconstexprnoexcept

◆ intersects()

template<fishnet::math::Number T>
constexpr bool fishnet::geometry::Ray< T >::intersects ( LinearGeometry auto const &  other) const
inlineconstexprnoexcept

◆ isParallel()

template<fishnet::math::Number T>
constexpr bool fishnet::geometry::Ray< T >::isParallel ( LinearGeometry auto const &  other) const
inlineconstexprnoexcept

◆ left()

template<fishnet::math::Number T>
static constexpr Ray< T > fishnet::geometry::Ray< T >::left ( Vec2D< T >  origin)
inlinestaticconstexprnoexcept

◆ operator-()

template<fishnet::math::Number T>
constexpr Ray< T > fishnet::geometry::Ray< T >::operator- ( ) const
inlineconstexpr

◆ operator==()

template<fishnet::math::Number T>
template<fishnet::math::Number U>
constexpr bool fishnet::geometry::Ray< T >::operator== ( const Ray< U > &  other) const
inlineconstexprnoexcept

◆ oppositeRay()

template<fishnet::math::Number T>
constexpr Ray< T > fishnet::geometry::Ray< T >::oppositeRay ( ) const
inlineconstexprnoexcept

◆ origin()

template<fishnet::math::Number T>
constexpr Vec2D< T > fishnet::geometry::Ray< T >::origin ( ) const
inlineconstexprnoexcept

◆ right()

template<fishnet::math::Number T>
static constexpr Ray< T > fishnet::geometry::Ray< T >::right ( Vec2D< T >  origin)
inlinestaticconstexprnoexcept

◆ toLine()

template<fishnet::math::Number T>
constexpr Line< T > fishnet::geometry::Ray< T >::toLine ( ) const
inlineconstexprnoexcept

◆ toString()

template<fishnet::math::Number T>
constexpr std::string fishnet::geometry::Ray< T >::toString ( ) const
inlineconstexpr

◆ up()

template<fishnet::math::Number T>
static constexpr Ray< T > fishnet::geometry::Ray< T >::up ( Vec2D< T >  origin)
inlinestaticconstexprnoexcept

Member Data Documentation

◆ type

template<fishnet::math::Number T>
constexpr GeometryType fishnet::geometry::Ray< T >::type = GeometryType::RAY
staticconstexpr

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