cgv
Loading...
Searching...
No Matches
cgv::math::fray< T, N > Struct Template Reference

Struct template for fixed n-dimensional rays with arbitrary data type defined by origin and direction. More...

#include <fray.h>

Public Member Functions

 fray ()
 Construct an invalid ray with origin at zero and undefined direction.
 
 fray (const fvec< T, N > &origin, const fvec< T, N > &direction)
 Construct a ray with given origin and direction.
 
fvec< T, N > position (float t) const
 Return the position of the ray at the given distance (ray parameter t) from its origin.
 

Public Attributes

fvec< T, N > origin
 
fvec< T, N > direction
 

Detailed Description

template<typename T, cgv::type::uint32_type N>
struct cgv::math::fray< T, N >

Struct template for fixed n-dimensional rays with arbitrary data type defined by origin and direction.

Definition at line 11 of file fray.h.

Constructor & Destructor Documentation

◆ fray() [1/2]

template<typename T , cgv::type::uint32_type N>
cgv::math::fray< T, N >::fray ( )
inline

Construct an invalid ray with origin at zero and undefined direction.

Definition at line 16 of file fray.h.

◆ fray() [2/2]

template<typename T , cgv::type::uint32_type N>
cgv::math::fray< T, N >::fray ( const fvec< T, N > &  origin,
const fvec< T, N > &  direction 
)
inline

Construct a ray with given origin and direction.

Definition at line 22 of file fray.h.

Member Function Documentation

◆ position()

template<typename T , cgv::type::uint32_type N>
fvec< T, N > cgv::math::fray< T, N >::position ( float  t) const
inline

Return the position of the ray at the given distance (ray parameter t) from its origin.

Definition at line 25 of file fray.h.

Member Data Documentation

◆ direction

template<typename T , cgv::type::uint32_type N>
fvec<T, N> cgv::math::fray< T, N >::direction

Definition at line 13 of file fray.h.

◆ origin

template<typename T , cgv::type::uint32_type N>
fvec<T, N> cgv::math::fray< T, N >::origin

Definition at line 12 of file fray.h.


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