-
Notifications
You must be signed in to change notification settings - Fork 0
/
Disc.h
31 lines (24 loc) · 808 Bytes
/
Disc.h
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
31
#ifndef Disc_h
#define Disc_h
#include "Vector.h"
#include "Primitive.h"
class HitRecord;
class Point;
class RenderContext;
class Disc : public Primitive {
public:
Disc(Material* material, const Vector& n, double r, const Point& q);
virtual ~Disc();
virtual void getBounds(BoundingBox& bbox, const RenderContext&) const;
virtual void intersect(HitRecord& hit, const RenderContext& context, const Ray& ray) const;
virtual void normal(Vector& normal, const RenderContext& context,
const Point & hitpos, const Ray& ray, const HitRecord& hit) const;
private:
Disc(const Disc&);
Disc& operator=(const Disc&);
Vector n; //normal
double r; //radius
Point q; //center
double d;
};
#endif //Disc_h