修改Camera旋转函数名称

This commit is contained in:
hyzboy 2019-06-14 19:41:14 +08:00
parent 8fc90afcfe
commit 572a039d82
2 changed files with 5 additions and 5 deletions

View File

@ -276,8 +276,8 @@ public:
if(key_status[kbUp ])camera.WrapUpRotate (move_speed);else
if(key_status[kbDown ])camera.WrapDownRotate (move_speed);else
if(key_status[kbHome ])camera.ForwardTilt (move_speed);else
if(key_status[kbEnd ])camera.LeaningBack (move_speed);else
if(key_status[kbHome ])camera.ForwardRotate (move_speed);else
if(key_status[kbEnd ])camera.BackwardRotate (move_speed);else
if(key_status[kbDelete ])camera.LeftRotate (move_speed);else
if(key_status[kbPageDown])camera.RightRotate (move_speed);else
return;

View File

@ -22,7 +22,7 @@ namespace hgl
float width; ///<视图宽
float height; ///<视图高
float fov=90; ///<水平FOV
float fov=60; ///<水平FOV
float znear=0,zfar=1000; ///<Z轴上离眼睛的距离
Vector4f eye; ///<眼睛坐标
@ -94,8 +94,8 @@ namespace hgl
public: //以自身为中心旋转
virtual void LeaningBack(float ang=5){Rotate(ang,cross(center-eye,up_vector));} ///<后仰
virtual void ForwardTilt(float ang=5){LeaningBack(-ang);} ///<前倾
virtual void BackwardRotate(float ang=5){Rotate(ang,cross(center-eye,up_vector));} ///<后仰
virtual void ForwardRotate(float ang=5){BackwardRotate(-ang);} ///<前倾
virtual void RightRotate(float ang=5){Rotate(ang,up_vector);} ///<右转
virtual void LeftRotate(float ang=5){RightRotate(-ang);} ///<左转