资源简介
objModelLoading.rar
代码片段和文件信息
#include “camera.h“
QMatrix4x4 Camera::getViewMatrix()
{
QMatrix4x4 view;
view.lookAt(this->position this->position + this->front this->up);
return view;
}
void Camera::processKeyboard(Camera_Movement direction GLfloat deltaTime)
{
GLfloat velocity = this->movementSpeed * deltaTime;
if (direction == FORWARD)
this->position += this->front * velocity;
if (direction == BACKWARD)
this->position -= this->front * velocity;
if (direction == LEFT)
this->position -= this->right * velocity;
if (direction == RIGHT)
this->position += this->right * velocity;
if (direction == UP)
this->position += this->worldUp * velocity;
if (direction == DOWN)
this->position -= this->worldUp * velocity;
}
void Camera::processMouseMovement(GLfloat xoffset GLfloat yoffset GLboolean constraintPitch)
{
xoffset *= this->mouseSensitivity;
yoffset *= this->mouseSensitivity;
this->yaw += xoffset;
this->picth += yoffset;
if (constraintPitch) {
if (this->picth > 89.0f)
this->picth = 89.0f;
if (this->picth < -89.0f)
this->picth = -89.0f;
}
this->updateCameraVectors();
}
void Camera::processMouseScroll(GLfloat yoffset)
{
if (this->zoom >= 1.0f && this->zoom <= 45.0f)
this->zoom -= yoffset;
if (this->zoom > 45.0f)
this->zoom = 45.0f;
if (this->zoom < 1.0f)
this->zoom = 1.0f;
}
void Camera::updateCameraVectors()
{
GLfloat yawR = qDegreesToRadians(this->yaw);
GLfloat picthR = qDegreesToRadians(this->picth);//转换为弧度制Radians
QVector3D front3(cos(yawR) * cos(picthR) sin(picthR) sin(yawR) * cos(picthR));
this->front = front3.normalized();
this->right = QVector3D::crossProduct(this->front this->worldUp).normalized();
this->up = QVector3D::crossProduct(this->right this->front).normalized();
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1880 2018-05-05 17:23 objModelLoading\camera.cpp
文件 1750 2018-05-09 13:09 objModelLoading\camera.h
文件 1785 2018-08-08 14:28 objModelLoading\light.cpp
文件 255 2018-08-08 14:22 objModelLoading\light.h
文件 384 2018-07-31 23:38 objModelLoading\main.cpp
文件 1611 2018-08-01 16:09 objModelLoading\mainwindow.cpp
文件 769 2018-08-01 16:06 objModelLoading\mainwindow.h
文件 3512 2018-08-01 16:25 objModelLoading\mainwindow.ui
文件 11060 2018-08-01 20:48 objModelLoading\model.cpp
文件 1161 2018-08-01 15:49 objModelLoading\model.h
文件 1327 2018-08-08 14:11 objModelLoading\objModelLoading.pro
文件 24118 2018-08-17 14:14 objModelLoading\objModelLoading.pro.user
文件 6339 2018-08-08 14:28 objModelLoading\oglmanager.cpp
文件 1419 2018-08-01 16:06 objModelLoading\oglmanager.h
文件 365 2017-01-06 22:23 objModelLoading\res\models\biwutai\biwutai.mtl
文件 154948 2017-01-06 22:38 objModelLoading\res\models\biwutai\biwutai.obj
文件 895774 2017-01-26 16:12 objModelLoading\res\models\biwutai\yanse.png
文件 393031 2012-01-20 15:40 objModelLoading\res\models\huapen\Arch41_039_bark.jpg
文件 613 2017-03-01 19:26 objModelLoading\res\models\huapen\penzi.mtl
文件 518099 2017-03-01 19:24 objModelLoading\res\models\huapen\penzi.obj
文件 859708 2018-06-06 10:20 objModelLoading\res\models\huapen\pen_new.obj
文件 151979 2018-06-06 10:21 objModelLoading\res\models\huapen\solid_new.obj
文件 13407 2017-03-01 19:20 objModelLoading\res\models\huapen\white.jpg
文件 374 2016-11-06 21:21 objModelLoading\res\models\jidi\1.mtl
文件 233150 2016-09-30 16:04 objModelLoading\res\models\jidi\1.obj
文件 244 2014-09-15 09:26 objModelLoading\res\models\jidi\3D学院.url
文件 1048630 2016-09-30 15:57 objModelLoading\res\models\jidi\Nexus_Destroyed_diff.bmp
文件 349680 2016-09-30 15:56 objModelLoading\res\models\jidi\Nexus_Destroyed_diff.dds
文件 444 2014-09-11 15:35 objModelLoading\res\models\jidi\说明read me_3DXY.txt
文件 312 2009-10-17 00:27 objModelLoading\res\models\su_27\1792ae92.dds
............此处省略222个文件信息
相关资源
- 论文.zip
- 地理信息系统导论.pptx
- 2013.rar
- 会员管理软件单机汽车4S店版6.4Reg注册
- OkDataRecovery.rar
- game.zip
- 人件中英文版+人月神话+最后期限.r
- vc13.rar
- csdnforwindows.zip
- ntko_officev3.0.0.7.zip
- 9u-Xt-.net企业门户网站源码.rar
- 7p-co-net宿舍管理信息系统最终版完整
- z1-k3-net企业门户网站源码非常适合企
- oz-Az-net实现网吧锁屏源码--屏蔽系统热
- 过NP版CE.rar
- 88E1116R_Datasheet.pdf
- 网络分析仪HP8753中文使用指南.pdf
- PatternRecognitionAndMachineLearning.zip138785
- 工.rar
- ImitateWeiboIssuePager.zip
- Spread.rar
- 网狐棋牌.pdf
- 量子力学(曾谨严).pdf
- 13152239lfeg.zip
- yyz炫舞v2.19源码.zip
- oofficepjwor_xpgod.zip
- 练习答案.rar
- 我的美丽家乡----大同.rar
- MF000638-C.NET在线考试系统源码.zip
- OrCAD10.5软件精简版.rar
评论
共有 条评论