camera.h
上传用户:henghua
上传日期:2007-11-14
资源大小:7655k
文件大小:1k
- #ifndef _camera_
- #define _camera_
- #include <d3dx9.h>
- #include "dxmouse.h"
- #include "MeshObj.h"
- class CCamera{
- // 数据成员
- public:
- D3DXVECTOR3 position, forward, up, right;
- float fov, aspect, znear, zfar, rotx, roty, rotz;
- D3DXMATRIXA16 view, invview, proj, invproj, viewproj, invviewproj;
-
- bool keys[256];
- // 函数成员
- public:
- CCamera();
- CCamera(const CCamera *src);
- CCamera(D3DXVECTOR3 pos, float rotx, float roty, float rotz, float fov, float aspect, float nearz, float farz);
- ~CCamera();
- void Update();
- void UpdateLookAt();
- void GetKey(int k);
- void LostKey(int k);
- void UpdataMouse(dxmouse *pM);
- void UpdataKey();
- void UpdateBoat(dxmouse *pM, CMeshObj *pMesh);
- };
- #endif