C++ / OpenCL Raytracer
Ray Class Reference

#include <ray.h>

Public Member Functions

 Ray (const Vector3D &a, const Vector3D &b)
 
Vector3D Origin () const
 Returns Vector3D starting location of Ray.
 
Vector3D Direction () const
 Returns Vector3D ending location of Ray.
 
Vector3D PointAtParameter (double t) const
 Returns Vector3D location on ray based on given t value.
 

Public Attributes

int m_iSign [3]
 Array of 0 or 1 values dependent on InvDir of x(0), y(1), or z(2) value of Ray.
 
Vector3D m_vA
 Starting location of Ray; Origin.
 
Vector3D m_vB
 Ending location of Ray; Direction.
 
Vector3D m_vInvDir
 Inverted direction of Ray.
 
Vector3D m_vUnitDirection
 UnitVector Vector3D of Ray Direction.
 

Detailed Description

Ray function.

Constructor & Destructor Documentation

◆ Ray()

Ray::Ray ( const Vector3D a,
const Vector3D b 
)
inline

Creates ray between two Vector3D locations.

Example:

Ray r(Vector3D(3), Vector3D(0));

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