C++ / OpenCL Raytracer
|
#include <material.h>
Public Member Functions | |
virtual bool | Scatter (const Ray &r_in, const HitRecord &rec, Vector3D &attenuation, Ray &scattered) const =0 |
virtual int | MatType () const =0 |
virtual Vector3D | MatColor () const =0 |
virtual double | MatFuzz () const =0 |
virtual double | MatRef () const =0 |
Static Public Member Functions | |
static Vector3D | Reflect (const Vector3D &v, const Vector3D &n) |
static Vector3D | RandomInUnitSphere () |
Renderable Material used to color Objects.
|
pure virtual |
Return Vector3D value for material color.
Example:
MatColor();
Implemented in Dielectric, Metal, and Lambertian.
|
pure virtual |
Return double value for material fuzz.
Example:
MatFuzz();
Implemented in Dielectric, Metal, and Lambertian.
|
pure virtual |
Return double value for material refraction index.
Example:
MatRef();
Implemented in Dielectric, Metal, and Lambertian.
|
pure virtual |
Return int value based on which material an object has. Used to determine normal calculation for box
Example:
MatType();
Implemented in Dielectric, Metal, and Lambertian.
|
inlinestatic |
|
pure virtual |
Return boolean value if ray scatters based on Material attenuation.
Example:
Scatter(StartingRay, rec, attenuation, ScatteredRay);
Implemented in Dielectric, Metal, and Lambertian.