-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplane.h
35 lines (25 loc) · 1.19 KB
/
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
30
31
32
33
34
/***************************************************************************
plane.h - description
-------------------
begin : Tue Sep 12 2000
***************************************************************************/
// Plane.h: interface for the Plane class.
//
//////////////////////////////////////////////////////////////////////
#include "threedimensionalshape.h"
class Plane : public ThreeDimensionalShape {
private:
double a, b, c, d; // coefficients of x, y, z and d in Ax + By + Cz + D = 0
Point3d* thru_point; // point in the plane used when creating and finding normals
public:
Plane(Point3d* thruPoint, Point3d* normal, double diff_ref, double spec_ref);
virtual ~Plane();
virtual bool intersects(Ray* r, Point3d* cam);
//
// Does the ray r intersect with this plane? pass t by refernce
/////////////////////////////////////////////////////////////////////////
virtual void calcNormal(Ray* norm, Point3d* inters);
//
// calculate normal unit vector at point where ray r intersects plane
/////////////////////////////////////////////////////////////////////////
};