GAMES101 作业1 基础版 答案 您所在的位置:网站首页 ups的作业的答案 GAMES101 作业1 基础版 答案

GAMES101 作业1 基础版 答案

2024-06-01 02:49| 来源: 网络整理| 查看: 265

简介

GAME101作业1的答案,基础版本,仅供参考,一直认为,没有标准版本和评级版本的作业没有必要做。所以希望分享我的观点。

问题

实现 MVP中的M和P矩阵的构建。 get_model_matrix(float rotation_angle): 逐个元素地构建模型变换矩阵并返回该矩阵。在此函数中,你只需要实现三维中绕 z 轴旋转的变换矩阵,而不用处理平移与缩放。 get_projection_matrix(float eye_fov, float aspect_ratio, float zNear, float zFar): 使用给定的参数逐个元素地构建透视投影矩阵并返回该矩阵。

关于model矩阵的构建&code

model 在闫老师的课程上说的是,关于物品的摆放。

Eigen::Matrix4f get_model_matrix(float rotation_angle) { Eigen::Matrix4f model = Eigen::Matrix4f::Identity(); // TODO: Implement this function // Create the model matrix for rotating the triangle around the Z axis. // Then return it. Eigen::Matrix4f rotate; float radian = rotation_angle/180.0*MY_PI; rotate


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有