LiFeng_Camera.h
资源名称:虚拟地形建模.rar [点击查看]
上传用户:dfjhuyju
上传日期:2013-03-13
资源大小:11035k
文件大小:1k
源码类别:
OpenGL
开发平台:
Visual C++
- #include "Vector3.h"
- class LiFeng_Camera
- {
- public:
- LiFeng_Camera();
- Init(HWND wnd);
- void PositionCamera(float positionX, float positionY, float positionZ,
- float viewX, float viewY, float viewZ,
- float upVectorX, float upVectorY, float upVectorZ);
- void RotateView(float angle, float X, float Y, float Z);
- void SetViewByMouse(int w,int h,BOOL rol);
- void RotateAroundPoint(CVector3 vCenter, float X, float Y, float Z);
- void StrafeCamera(float speed);
- void MoveCamera(float speed);
- void CalculateHorizonVec();
- void CalculateVerticalVec();
- void CheckForMovement(float speed);
- void Update(int w,int h,float speed);
- void Look();
- CVector3 GetEyePosition(){return m_vPosition;}
- CVector3 GetViewPosition(){return m_vView;}
- CVector3 GetUpVector(){return m_vUpVector;}
- CVector3 GetStrafe(){return m_vStrafe;}
- CVector3 GetVerticalVector(){return VerticalVector;}
- CVector3 GetViewDerection(){return ViewDerection;}
- void SetEyePosition(float x, float y, float z)
- { m_vPosition.x = x; m_vPosition.y = y;m_vPosition.z = z; }
- public:
- HWND hwnd;
- CVector3 m_vPosition;
- CVector3 m_vView;
- CVector3 m_vUpVector;
- CVector3 m_vStrafe;
- CVector3 VerticalVector;
- CVector3 ViewDerection;
- BOOL m_Role;
- BOOL Role_Flag;
- };