C++ / OpenCL Raytracer
HitRecord Struct Reference

#include <object.h>

Public Attributes

double m_dT
 Position along ray where intersection takes place.
 
Vector3D m_vP
 Vector3D location of intersection.
 
Vector3D m_vNormal
 Vector3D normal to point of intersection.
 
Materialm_pmCurMat
 Pointer to Material that the specified pixel should render.
 

Detailed Description

Structure to store values when ray hits object.

Example:

HitRecord rec { dT, r.PointAtParameter(rec.dT), (rec.m_vP - m_vCenter) / dRadius, pmCurMat };

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