-
Notifications
You must be signed in to change notification settings - Fork 1
/
Shape.h
47 lines (35 loc) · 931 Bytes
/
Shape.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
38
39
40
41
42
43
44
45
46
47
// Shape.h: interface for the CShape class.
//
//////////////////////////////////////////////////////////////////////
# ifndef _SHAPE_H
# define _SHAPE_H
# include "OnscreenObject.h"
# include "Color.h"
# include "Ray.h"
# include "Point3D.h"
# include "Shader.h"
# include "Vector.h"
// The include files
class CIntersectionInfo;
class CShader;
class CShape : public COnScreenObject
{
public:
// Constructors:
CShape ();
CShape (CPoint3D pos, CColor col);
// Interface
virtual void SetObjectColor (CColor col);
virtual CColor GetObjectColor ();
virtual void AssignShader (CShader* shader);
// Pure virtual Functions
virtual CIntersectionInfo GetIntersection (CRay) = 0;
virtual CColor ShadePoint (CIntersectionInfo objHitInfo) = 0;
virtual CTexCoords GetTexCoords (CPoint3D ptOfIntersection) = 0;
// Object destructor
virtual ~CShape();
protected:
CColor objColor;
CShader* m_pShader;
};
# endif