-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCamera.h
44 lines (32 loc) · 837 Bytes
/
Camera.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
// Camera.h: interface for the CCamera class.
//
//////////////////////////////////////////////////////////////////////
# ifndef _CAMERA_H
# define _CAMERA_H
# include "Vector.h"
# include "Ray.h"
# include "Point3D.h"
class CCamera
{
public:
// Object Constructors
CCamera ();
CCamera (CPoint3D objPosition, CVector upVector, CVector objLookAt,float fViewAngle, float fFilmPlane, float fAspect);
// Object destruction
virtual ~CCamera();
// Object interface
void Initialize();
void Describe();
CRay GetRay (double dFilmFractionX, double dFilmFractionY);
protected:
CVector m_vecUp;
CVector m_vecLookAt;
CPoint3D m_ptPosition;
float m_fFilmPlaneDistance;
float m_fAngleOfView;
float m_fAspectRatio; // y by x
CVector m_vecWidth;
CVector m_vecHeight;
CPoint3D m_ptTopLeftOfFilm;
};
# endif