-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlane.h
37 lines (27 loc) · 820 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
30
31
32
33
34
35
36
37
/*----------------------------------------------------------
* COSC363 Ray Tracer
*
* The Plane class
* This is a subclass of Object, and hence implements the
* methods intersect() and normal().
-------------------------------------------------------------*/
#ifndef H_PLANE
#define H_PLANE
#include <glm/glm.hpp>
#include "SceneObject.h"
class Plane : public SceneObject
{
private:
glm::vec3 a, b, c, d; //The four vertices
public:
//Plane(void); ?? don't think I use this
Plane(glm::vec3 pa, glm::vec3 pb, glm::vec3 pc, glm::vec3 pd, glm::vec3 col)
: a(pa), b(pb), c(pc), d(pd)
{
color = col;
};
bool isInside(glm::vec3 pt);
float intersect_internal(glm::vec3 posn, glm::vec3 dir);
glm::vec3 normal_internal(glm::vec3 pt);
};
#endif //!H_PLANE