Assignments
Assignments
Util::Ray< Dim > Class Template Reference

#include <geometry.h>

Public Member Functions

 Ray (void)
 
 Ray (const Point< Dim > &position, const Point< Dim > &direction)
 
Ray operator+ (const Point< Dim > &p) const
 
Rayoperator+= (const Point< Dim > &p)
 
Ray operator- (const Point< Dim > &p) const
 
Rayoperator-= (const Point< Dim > &p)
 
Point< Dim > operator() (double t) const
 

Public Attributes

Point< Dim > position
 
Point< Dim > direction
 

Detailed Description

template<unsigned int Dim>
class Util::Ray< Dim >

This templated class represents a Ray.

Constructor & Destructor Documentation

◆ Ray() [1/2]

template<unsigned int Dim>
Util::Ray< Dim >::Ray ( void  )

The default constructor

◆ Ray() [2/2]

template<unsigned int Dim>
Util::Ray< Dim >::Ray ( const Point< Dim > &  position,
const Point< Dim > &  direction 
)

The constructor settign the the position and direction of the ray

Member Function Documentation

◆ operator()()

template<unsigned int Dim>
Point< Dim > Util::Ray< Dim >::operator() ( double  t) const

This method returns the point at a distance of t along the ray.

◆ operator+()

template<unsigned int Dim>
Ray< Dim > Util::Ray< Dim >::operator+ ( const Point< Dim > &  p) const

This method computes the translation of the ray by p and returns the translated ray.

◆ operator+=()

template<unsigned int Dim>
Ray< Dim > & Util::Ray< Dim >::operator+= ( const Point< Dim > &  p)

This method translates the current ray by p.

◆ operator-()

template<unsigned int Dim>
Ray< Dim > Util::Ray< Dim >::operator- ( const Point< Dim > &  p) const

This method computes the translation of the ray by -p and returns the translated ray.

◆ operator-=()

template<unsigned int Dim>
Ray< Dim > & Util::Ray< Dim >::operator-= ( const Point< Dim > &  p)

This method translates the current ray by -p.

Member Data Documentation

◆ direction

template<unsigned int Dim>
Point< Dim > Util::Ray< Dim >::direction

The direction of the ray

◆ position

template<unsigned int Dim>
Point< Dim > Util::Ray< Dim >::position

The starting point of the ray


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