-
Notifications
You must be signed in to change notification settings - Fork 1
/
Plane.h
48 lines (35 loc) · 1018 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
38
39
40
41
42
43
44
45
46
47
48
// Plane.h: interface for the CPlane class.
//
//////////////////////////////////////////////////////////////////////
# ifndef _PLANE_H
# define _PLANE_H
// Include files
# include "Shape.h"
# include "Vector.h"
class CPlane : public CShape
{
public:
// Object constructors
CPlane();
CPlane(CPoint3D pos, CColor col, float width, float height, CVector normal, CVector orientation);
CPlane(CPlane &plane1);
// Object interface
CIntersectionInfo GetIntersection (CRay ray);
void SetDimensions (float width, float height);
CVector GetNormalAt (CPoint3D pt);
void SetNormal (CVector normal);
CColor ShadePoint (CIntersectionInfo hitInfo);
CTexCoords GetTexCoords (CPoint3D ptOfIntersection);
// Destruction
virtual ~CPlane();
protected:
float m_fWidth;
float m_fLength;
// The following three vectors form a orthogonal coordinate
// system of their own. See 'note' in constructor
CVector m_vecNormal;
CVector m_vecOrientation;
CVector m_vecOrtho;
float m_fF;
};
# endif