-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObject.h
More file actions
31 lines (27 loc) · 762 Bytes
/
Copy pathObject.h
File metadata and controls
31 lines (27 loc) · 762 Bytes
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
/*----------------------------------------------------------
* COSC363 Ray Tracer
*
* The object class
* This is a generic type for storing objects in the scene.
* Being an abstract class, this class cannot be instantiated.
* Sphere, Plane etc, must be defined as subclasses of Object
* and provide implementations for the virtual functions
* intersect() and normal().
-------------------------------------------------------------*/
#ifndef H_OBJECT
#define H_OBJECT
#include "Vector.h"
#include "Color.h"
class Object
{
protected:
Color color;
public:
Object() {}
virtual float intersect(Vector pos, Vector dir) = 0;
virtual Vector normal(Vector pos) = 0;
virtual ~Object() {}
Color getColor();
void setColor(Color col);
};
#endif