1234567891011121314151617181920212223242526272829 |
- /*
- * DoRayMe - a quick and dirty Raytracer
- * Intersection header
- *
- * Created by Manoël Trapier
- * Copyright (c) 2020 986-Studio.
- *
- */
- #ifndef DORAYME_INTERSECTION_H
- #define DORAYME_INTERSECTION_H
- #include <stdlib.h>
- class Shape;
- class Intersection
- {
- public:
- double t;
- Shape *object;
- public:
- Intersection(double t, Shape *object) : t(t), object(object) { };
- bool nothing() { return (this->object == nullptr); };
- bool operator==(const Intersection &b) const { return ((this->t == b.t) && (this->object == b.object)); };
- };
- #endif //DORAYME_INTERSECTION_H
|