Hermes
hermes::Ray2 Class Reference

Public Member Functions

 Ray2 (const point2 &origin, const vec2 &direction)
 Parameters constructor. More...
 
point2 operator() (float t) const
 Computes a point in ray's path at the given parametric coordinate. More...
 

Public Attributes

point2 o
 ray's origin
 
vec2 d
 ray's direction
 

Constructor & Destructor Documentation

◆ Ray2()

hermes::Ray2::Ray2 ( const point2 origin,
const vec2 direction 
)

Parameters constructor.

Note
This constructor normalizes the direction internally
Parameters
origin
direction

Member Function Documentation

◆ operator()()

point2 hermes::Ray2::operator() ( float  t) const
inline

Computes a point in ray's path at the given parametric coordinate.

Parameters
t
Returns
o + d * t

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