-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plane.h
29 lines (27 loc) · 867 Bytes
/
Plane.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
#ifndef PLANE_H
#define PLANE_H
#include "Vector3D.h"
#include "Point3D.h"
#include "GeometricObject.h"
class Plane : public GeometricObject
{
public:
Vector3D normal;
Point3D p;
ColorRGB color;
double upperLimit, rightLimit, lowerLimit, leftLimit;
bool limitsDefined;
public:
Plane();
Plane(Vector3D normal, Point3D p);
Plane(Vector3D normal, Point3D p, ColorRGB color);
Plane(Vector3D normal, Point3D p, ColorRGB color, double upperLimit,
double rightLimit, double lowerLimit, double leftLimit);
// Plane(Vector3D normal, Point3D p, ColorRGB color,
// Point3D upLeft, Point3D upRight, Point3D downLeft, Point3D downRight);
bool isImpact(const Ray &ray, double &t, Vector3D &n, Point3D &q) const;
void setColor(double red, double green, double blue);
ColorRGB getColor(Point3D);
void setHasShadow(bool shadow);
};
#endif