games101-hw/06/Assignment6/Object.hpp

30 lines
748 B
C++
Raw Normal View History

2023-06-19 17:02:04 +08:00
//
// Created by LEI XU on 5/13/19.
//
#pragma once
#ifndef RAYTRACING_OBJECT_H
#define RAYTRACING_OBJECT_H
#include "Vector.hpp"
#include "global.hpp"
#include "Bounds3.hpp"
#include "Ray.hpp"
#include "Intersection.hpp"
class Object
{
public:
Object() {}
virtual ~Object() {}
virtual bool intersect(const Ray& ray) = 0;
virtual bool intersect(const Ray& ray, float &, uint32_t &) const = 0;
virtual Intersection getIntersection(Ray _ray) = 0;
virtual void getSurfaceProperties(const Vector3f &, const Vector3f &, const uint32_t &, const Vector2f &, Vector3f &, Vector2f &) const = 0;
virtual Vector3f evalDiffuseColor(const Vector2f &) const =0;
virtual Bounds3 getBounds()=0;
};
#endif //RAYTRACING_OBJECT_H