-
Notifications
You must be signed in to change notification settings - Fork 0
/
Object.hpp
executable file
·30 lines (26 loc) · 1.56 KB
/
Object.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//
// Created by LEI XU on 5/13/19.
//
#pragma once
#ifndef RAYTRACING_OBJECT_H
#define RAYTRACING_OBJECT_H
#include "Bounds3.hpp"
#include "Intersection.hpp"
#include "Ray.hpp"
#include "Vector.hpp"
#include "global.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;
virtual float getArea() = 0;
virtual void Sample(Intersection &pos, float &pdf) = 0;
virtual bool hasEmit() = 0;
};
#endif//RAYTRACING_OBJECT_H