📄 glcamera.h
字号:
/*
glcamera.h - Camera class
Copyright (c) HalfLucifer, 2001.11.18
*/
#ifndef __GLCAMERAH__
#define __GLCAMERAH__
#include <windows.h>
#include <math.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include "glvector.h"
const int XMOUSE_SENSITIVE = 100;
const int YMOUSE_SENSITIVE = 1;
class GLcamera
{
public:
GLcamera(GLvector pos, GLvector view, GLvector up);
void Update();
void Move(float vec);
void Strafe(float vec);
void ViewMove();
void RotateView(float x, float y, float z);
GLvector GetPosition() { return m_Position; }
GLvector GetViewPoint() { return m_ViewPoint; }
GLvector GetUpVector() { return m_UpVector; }
GLvector GetRightVector();
void SetPosition(GLvector p) { m_Position = p; }
void SetViewPoint(GLvector v) { m_ViewPoint = v; }
protected:
GLvector m_Position;
GLvector m_ViewPoint;
GLvector m_UpVector;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -