header_utils
Loading...
Searching...
No Matches
ghassanpl::geometry::tray< T > Struct Template Reference

Represents a 2D ray. More...

#include <ray.h>

Public Types

using tvec
using value_type
using segment

Public Member Functions

basic_line_t< T > line () const noexcept
tray from_dir (tvec const &start, tvec const &dir) noexcept
tray from_points (tvec const &start, tvec const &second) noexcept
segment & set_position (tvec const &pos) noexcept
segment & operator+= (tvec const &offs) noexcept
segment & operator-= (tvec const &offs) noexcept
segment & translate (tvec const &offs) noexcept
T edge_length () const noexcept
tvec edge_point (T t) const
trec2< T > bounding_box () const
tvec closest_point_to (tvec const &pt) const
T projected_alpha (tvec const &pt) const

Public Attributes

tvec start
tvec dir

Detailed Description

template<std::floating_point T>
struct ghassanpl::geometry::tray< T >

Represents a 2D ray.

Definition at line 15 of file ray.h.

Member Typedef Documentation

◆ segment

template<std::floating_point T>
using ghassanpl::geometry::tray< T >::segment

Definition at line 21 of file ray.h.

◆ tvec

template<std::floating_point T>
using ghassanpl::geometry::tray< T >::tvec

Definition at line 19 of file ray.h.

◆ value_type

template<std::floating_point T>
using ghassanpl::geometry::tray< T >::value_type

Definition at line 20 of file ray.h.

Member Function Documentation

◆ bounding_box()

template<std::floating_point T>
trec2< T > ghassanpl::geometry::tray< T >::bounding_box ( ) const
inline

Definition at line 39 of file ray.h.

◆ closest_point_to()

template<std::floating_point T>
tvec ghassanpl::geometry::tray< T >::closest_point_to ( tvec const & pt) const
inline

Definition at line 40 of file ray.h.

◆ edge_length()

template<std::floating_point T>
T ghassanpl::geometry::tray< T >::edge_length ( ) const
inlinenoexcept

Definition at line 36 of file ray.h.

◆ edge_point()

template<std::floating_point T>
tvec ghassanpl::geometry::tray< T >::edge_point ( T t) const
inline

Definition at line 38 of file ray.h.

◆ from_dir()

template<std::floating_point T>
tray ghassanpl::geometry::tray< T >::from_dir ( tvec const & start,
tvec const & dir )
inlinenoexcept

Definition at line 28 of file ray.h.

◆ from_points()

template<std::floating_point T>
tray ghassanpl::geometry::tray< T >::from_points ( tvec const & start,
tvec const & second )
inlinenoexcept

Definition at line 29 of file ray.h.

◆ line()

template<std::floating_point T>
basic_line_t< T > ghassanpl::geometry::tray< T >::line ( ) const
inlinenoexcept

Definition at line 26 of file ray.h.

◆ operator+=()

template<std::floating_point T>
segment & ghassanpl::geometry::tray< T >::operator+= ( tvec const & offs)
inlinenoexcept

Definition at line 32 of file ray.h.

◆ operator-=()

template<std::floating_point T>
segment & ghassanpl::geometry::tray< T >::operator-= ( tvec const & offs)
inlinenoexcept

Definition at line 33 of file ray.h.

◆ projected_alpha()

template<std::floating_point T>
T ghassanpl::geometry::tray< T >::projected_alpha ( tvec const & pt) const
inline

Definition at line 46 of file ray.h.

◆ set_position()

template<std::floating_point T>
segment & ghassanpl::geometry::tray< T >::set_position ( tvec const & pos)
inlinenoexcept

Definition at line 31 of file ray.h.

◆ translate()

template<std::floating_point T>
segment & ghassanpl::geometry::tray< T >::translate ( tvec const & offs)
inlinenoexcept

Definition at line 34 of file ray.h.

Member Data Documentation

◆ dir

template<std::floating_point T>
tvec ghassanpl::geometry::tray< T >::dir

Definition at line 24 of file ray.h.

◆ start

template<std::floating_point T>
tvec ghassanpl::geometry::tray< T >::start

Definition at line 23 of file ray.h.