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.

19 lines
648 B

4 years ago
4 years ago
4 years ago
4 years ago
  1. #pragma once
  2. #include "Vector3.h"
  3. class Ray;
  4. class Texture2D;
  5. class Material {
  6. public:
  7. virtual bool Scatter(const Ray& input_ray, const HitPoint& hit_point, Ray& out_ray) = 0;
  8. };
  9. class LamberMaterial : public Material {
  10. public:
  11. Texture2D *mDiffuseTexture;
  12. LamberMaterial(Texture2D* diffuse) { mDiffuseTexture = diffuse; }
  13. bool Scatter(const Ray& input_ray, const HitPoint& hit_point, Ray& out_ray);
  14. };
  15. class MetalMaterial : public Material {
  16. public:
  17. Texture2D *mDiffuseTexture;
  18. MetalMaterial(Texture2D* diffuse) { mDiffuseTexture = diffuse; }
  19. bool Scatter(const Ray& input_ray, const HitPoint& hit_point, Ray& out_ray);
  20. };