CCamera.h
上传用户:jinmajixie
上传日期:2022-07-12
资源大小:435k
文件大小:1k
- #ifndef CCAMERA_H
- #define CCAMERA_H
- #include "main.h"
- /*******************************************************************************
- * CAMERA
- *******************************************************************************/
- class CCamera
- {
- public:
- CCamera();
- CVector *position_p; // attached position
- CVector *rotation_p; // attached rotation
- // CVector *lookat_p; // attached 'look at' point
- CVector look_vector; // looking vector calculated from position and rotation
- CVector lookat_point; // 'look at' point calculated from position and rotation
- bool AttachCameraPosition(CVector *p);
- bool AttachCameraRotation(CVector *r);
- CVector GetPosition();
- void SetglLookAt();
- // void SetglLookAtX(int q);
- float GetX() { return position_p->x; }
- float GetY() { return position_p->y; }
- float GetZ() { return position_p->z; }
-
- void AddX(float f) { position_p->x += f; lookat_point.x += f; }
- void AddY(float f) { position_p->y += f; lookat_point.y += f; }
- void AddZ(float f) { position_p->z += f; lookat_point.z += f; }
- };
- #endif