-
Notifications
You must be signed in to change notification settings - Fork 2
/
Camera.h
54 lines (40 loc) · 1.37 KB
/
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
45
46
47
48
49
50
51
52
53
54
//-----------------------------------------------------------------------------
// File: Camera.h
//
// Desc:
//
// Copyright (c) 2002 Dan
//-----------------------------------------------------------------------------
#ifndef _CAMERA_H_
#define _CAMERA_H_
#include <D3DX8math.h>
#include "dinput.h"
#include "main.h"
class CCamera
{
public:
CCamera();
virtual ~CCamera();
bool FrameMove( const float fElapsedTime, int viewType );
bool GetFromVec( float &x, float &y, float &z ) const;
bool GetToVec( float &x, float &y, float &z ) const;
bool GetUpVec( float &x, float &y, float &z ) const;
VECT GetFromVec() const { return m_From; }
VECT GetToVec() const { return m_To; }
VECT GetUpVec() const { return m_Up; }
bool SetFromVec( const float x, const float y, const float z );
bool SetToVec( const float x, const float y, const float z );
bool SetUpVec( const float x, const float y, const float z );
void SetFromVec( VECT vVec ) { m_From = vVec; }
void SetToVec( VECT vVec ) { m_To = vVec; }
void SetUpVec( VECT vVec ) { m_Up = vVec; }
bool Render();
bool RotateView( float X, float Y, float Z );
bool Move3D( float fElapsedTime );
bool MoveXZ( float fElapsedTime );
bool MoveXY( float fElapsedTime );
bool MoveYZ( float fElapsedTime );
private:
VECT m_From, m_To, m_Up;
};
#endif