You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
648 B

#pragma once
#include "Vector3.h"
class Ray;
class Texture2D;
class Material {
public:
virtual bool Scatter(const Ray& input_ray, const HitPoint& hit_point, Ray& out_ray) = 0;
};
class LamberMaterial : public Material {
public:
Texture2D *mDiffuseTexture;
LamberMaterial(Texture2D* diffuse) { mDiffuseTexture = diffuse; }
bool Scatter(const Ray& input_ray, const HitPoint& hit_point, Ray& out_ray);
};
class MetalMaterial : public Material {
public:
Texture2D *mDiffuseTexture;
MetalMaterial(Texture2D* diffuse) { mDiffuseTexture = diffuse; }
bool Scatter(const Ray& input_ray, const HitPoint& hit_point, Ray& out_ray);
};