Path Tracer
Public Member Functions | List of all members
Ray Class Reference

Combination of an origin and a direction. More...

#include <Ray.h>

Public Member Functions

 Ray ()
 Default constructor. More...
 
 Ray (const DoubleVec3D &origin, const DoubleUnitVec3D &direction)
 Main constructor. More...
 
 Ray (const Ray &ray)
 Copy constructor. More...
 
DoubleVec3D getOrigin () const
 Getter for the origin. More...
 
DoubleUnitVec3D getDirection () const
 Getter for the direction. More...
 
void setOrigin (const DoubleVec3D &origin)
 Setter for the origin. More...
 
void setDirection (const DoubleUnitVec3D &direction)
 Setter for the direction. More...
 

Detailed Description

Combination of an origin and a direction.

Constructor & Destructor Documentation

◆ Ray() [1/3]

Ray::Ray ( )

Default constructor.

By default, the origin is at (0, 0, 0) and the direction is (1, 0, 0)

◆ Ray() [2/3]

Ray::Ray ( const DoubleVec3D origin,
const DoubleUnitVec3D direction 
)

Main constructor.

Parameters
originWhere the ray starts.
directionThe ray direction.

◆ Ray() [3/3]

Ray::Ray ( const Ray ray)

Copy constructor.

Parameters
rayThe ray that will be copied.

Member Function Documentation

◆ getDirection()

DoubleVec3D Ray::getDirection ( ) const

Getter for the direction.

Returns
This ray's direction.

◆ getOrigin()

DoubleVec3D Ray::getOrigin ( ) const

Getter for the origin.

Returns
This ray's origin.

◆ setDirection()

void Ray::setDirection ( const DoubleUnitVec3D direction)

Setter for the direction.

Parameters
directionThe new direction of this ray.

◆ setOrigin()

void Ray::setOrigin ( const DoubleVec3D origin)

Setter for the origin.

Parameters
originThe new origin of this ray.

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