Java Python ECE 4122/6122 Lab 3: OpenGL with OBJ files and Multiple Objects
(100 pts)
Category: 3D Graphics
Due: Tuesday October 22th
, 2023 by 11:59 PM
Objective:
To create a dynamic 3D graphics application using lighting, shading, model transformations, and
keyboard inputs.
Description:
You can use the code from tutorial09_Assimp to create a C++ application that loads in the obj files for
the 3D chess pieces and the chess board.
Modify the keyboard inputs so that (5 points each)
1) ‘w’ key moves the camera radially closer to the origin.
2) ‘s’ key moves the camera radially farther from the origin.
3) ‘a’ key rotates the camera to the left maintaining the radial distance from the origin.
4) ‘d’ key rotates to camera to the right maintaining the radial distance from the origin.
5) The up arrow key radially rotates the camera up.
6) The down arrow radially rotates the camera down.
7) The ‘L’ key toggles the specular and diffuse components of the light on and off but leaves the
ambient component unchanged.
8) Pressing the escape key closes the window and exits the program
Points grading:
• 30 Points – loading obj files and displaying the chess pieces.
• 30 Points – rotating and placing the chess pieces in the correct location and orientation
• 40 Points – keyboard control described above
• 5 pts extra credit the textures are applied correctly to the chess pieces and chessboard.
• 5 pts extra credit make a short, narrated video of your program in action. (include it in the zip
file)
Turn-In Instructions
Create a Lab3 folder at the same level as the other tutorialxx _xx folders and place your code and the attached
folders containing the obj file information in that folder.
Modify the top level CMakeLists.txt file to build your Lab3 application. You can make any needed changes
to the files in the common folder to handle the keyboard input.
Zip up the folders Lab3 and common into Lab3.zip and upload this zip file on the assignment section of
Canvas. When the TAs replace the existing folders with yours and the code should compile and run correctly.
You can also include a short, narrated video of your program in action.
Grading Rubric:
If a student’s program runs correctly and produces the desired output, the student has the potential to get a 100
on his or her homework; however, TA’s will look through your code for other elements needed to meet the lab
requirements. The table below shows typical deductions that could occur.
AUTOMATIC GRADING POINT DEDUCTIONS PER PROBLEM: < ECE 4122、C++ br>Element Percentage
Deduction
Details
Does Not Compile 40% Code does not compile on PACE-ICE!
Does Not Match Output Up to 90% The code compiles but does not produce correct outputs.
Clear Self-Documenting
Coding Styles
Up to 25% This can include incorrect indentation, using unclear variable names,
unclear/missing comments, or compiling with warnings. (See
Appendix A)
LATE POLICY
Element Percentage Deduction Details
Late Deduction Function score – 0.5 * H H = number of hours (ceiling function) passed
deadline
Appendix A: Coding Standards
Indentation:
When using if/for/while statements, make sure you indent 4 spaces for the content inside those. Also make
sure that you use spaces to make the code more readable.
For example:
for (int i; i < 10; i++)
{
j = j + i;
}
If you have nested statements, you should use multiple indentions. Each { should be on its own line (like the
for loop) If you have else or else if statements after your if statement, they should be on their own line.
for (int i; i < 10; i++)
{
if (i < 5)
{
counter++;
k -= i;
}
else
{
k +=1;
}
j += i;
}
Camel Case:
This naming convention has the first letter of the variable be lower case, and the first letter in each new word
be capitalized (e.g. firstSecondThird).
This applies for functions and member functions as well!
The main exception to this is class names, where the first letter should also be capitalized.
Variable and Function Names:
Your variable and function names should be clear about what that variable or function represents. Do not use
one letter variables, but use abbreviations when it is appropriate (for example: “imag" instead of
“imaginary”). The more descriptive your variable and function names are, the more readable your code will
be. This is the idea behind self-documenting code.
File Headers:
Every file should have the following header at the top
/*
Author: your name
Class: ECE4122 or ECE6122 (section)
Last Date Modified: date
Description:
What is the purpose of this file?
*/
Code Comments:
1. Every function must have a comment section describing the purpose of the function, the input and
output parameters, the return value (if any).
2. Every class must have a comment section to describe the purpose of the class.
3. Comments need to be placed inside of functions/loops to assist in the understanding of the flow of
the code
相关推荐
WRF后处理总结:wrf-python与NCL在WRF后处理中的基本应用——变量提取、计算与可视化
判断需要提取的变量与诊断量确定后,使用getvar函数进行提取。可使用ncdump-h命令查看wrfout中的变量,wrf中的诊断量分类也可从官方文档处查阅。判断绘图类型所需的可视化绘图类型,决定了你在WRF后处理中的计算步骤。1D点线图:ll_to_xy interpline2D填色图:interplevel3D剖面图:vinterp vertcross绘图、美化色标、XY轴、标签的设置等等。
ECE 4122/6122 Lab 3: OpenGL with OBJ files and Multiple ObjectsC/C++
4122/6122Lab3:OpenGLwithOBJfilesandMultipleGradingRubric:PercentageDeductionDetails40%PACE-ICE!Upto90%ClearCodingStylesUpto25%names,Detailsscore0.5* Hhours (ceideadlinefor (int i;i < 10;i++)j = j + i;
关于mos管的压降问题(项目遇到问题总结)
在研发过程中没有出现问题的板子,到了小批时竟出现雷达一直在触发???找了大几天,没有头绪。心中疑惑颇多,加上老板催促,自考等原因,真是压力山大。4月份自考,只有差不多一个月时间了吧,没有什么大的收获,反而在查找硬件问题的过程中,发现了一个自己忽视的一个问题,就是关于Mos管的压降问题。 备考的过程崎岖不平,工作又问题多多,孰轻孰重,如何取舍?从心理来说,不想取舍什么,只是有所得就可以,过不了就过不了呗,已经毕业十五年了,没这个本科文凭不也过来了吗?只是代表了自己在这一段时间的思考,自己兴趣吧,没什么大不了
ECE 4122/6122 CUDA-based Game
(100 pts)Objective:The flagscells.??????DeductionDetailscode setupUp to 10%deadlinefor (int i;i < 10;i++)j = j + i;for (int i;i < 10;i++)
【MATLAB+VScode】VScode调试MATLAB代码的终极指南
本文详细介绍了在VScode中调试MATLAB代码的完整方案。通过配置MATLAB Engine for Python作为桥梁,实现在VScode中设置断点、单步执行、查看变量等交互式调试功能,有效结合了VScode的现代化编辑体验与MATLAB的强大计算内核,显著提升开发效率。
量化爬虫实战:手把手教你搞定同花顺问财的hexin-v参数(附JS逆向思路与Cookie Hook技巧)
本文详细解析了如何通过JS逆向技术获取同花顺问财平台的`hexin-v`参数,包括Cookie Hook技巧和完整解决方案架构。从环境搭建到参数定位,再到生成逻辑逆向,手把手教你突破数据获取限制,为量化交易提供可靠数据支持。
ECE 4122/6122 OpenGL with OBJ files and Multiple Objects
(100 pts)Objective:file)DeductionDetailsdeadlinefor (int i;i < 10;i++)j = j + i;for (int i;i < 10;i++)if (i < 5)counter++;k -= i;elsek +=1;j += i;
Qt多线程实战:如何优雅地处理Modbus设备通信中的线程安全问题
本文深入探讨了在Qt框架下实现Modbus设备通信时的多线程安全问题,提供了优雅的解决方案。通过生产者-消费者模型、任务队列与锁机制等设计模式,有效解决了界面卡顿、数据包错乱等问题。文章还详细介绍了对象生命周期管理、信号槽连接类型选择等关键实现细节,帮助开发者构建稳定可靠的Modbus通信模块。
深挖C++:类和对象(中)
(先进后出)
第三方系统(异构系统)基于token身份认证方式访问Ecology9的Restful接口Ecology9服务器配置部分
通过Token的认证方式调用Ecology9系统Restful业务接口服务器配置部分
金蝶云星空核心数据表解析与高效关联查询指南
本文深入解析金蝶云星空核心数据表结构,提供高效关联查询的实战指南。文章详细介绍了基础资料、业务单据和财务模块的关键表及其关联逻辑,重点阐述了如何利用关联表(_LK表)进行跨单据溯源,并分享了编写高性能SQL的实用技巧与避坑建议,帮助开发者、实施顾问和数据分析师快速掌握数据查询方法,提升工作效率。
跟我学c++中级篇—类型定义的方式
本文系统阐述了编程中类型定义的重要性及c++中的实现方式。重点对比了宏定义、typedef与modern using三种机制,指出using在可读性、灵活性和模板支持上的优势,推荐优先使用。同时提醒开发者注意别名滥用、类型歧义、错误信息冗长等问题,强调统一规范与合理设计。最终结论:在现代c++开发中,应以using为主,兼顾简洁性与可维护性,避免陷入命名混乱与编译困境。
Dify 第 7 篇 Dify 应用介绍 + 聊天助手&Agent 应用关键点说明
本文介绍了Dify应用的核心概念与使用方法。Dify是基于大模型构建的实际场景应用,提供API、WebApp和易用界面。包含5种应用类型:聊天助手、文本生成、Agent、对话流和工作流。创建方式有模板创建、空白应用和DSL文件三种。重点讲解了聊天助手和Agent应用的关键功能:聊天助手支持提示词优化、知识库引用、文件处理等;Agent应用则强调推理能力、工具调用和任务自动化。文章还详细介绍了应用的调试、发布和管理工具,为开发者提供了全面的应用构建指南。
【C/C++ 第一次跨越(下):移动语义与 noexcept——不改变行为的性能修复】
本文详解C++11移动语义在迁移至现代C++时的性能优化策略,强调“不改变行为”的前提下通过合理使用移动语义消除深拷贝开销。重点解析移动操作生成规则:析构函数、拷贝函数或const/引用成员会抑制移动构造;noexcept影响std::vector是否选择移动而非回退拷贝。提出“Rule of Zero”原则——用RAII封装资源,避免手动实现特殊成员函数,确保移动语义被正确调用,实现零开销移动与内存安全。
Devexpress16.2.6破解工具
Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具
汉书HE8,好用的汇编代码编写工具
汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大
【C++】C++17的主要特性
C++17引入多项重要特性:结构化绑定简化多值返回与遍历;inline变量解决头文件中变量定义的ODR问题,支持类内初始化;if/switch初始化语句允许在条件中声明变量,提升代码简洁性;属性语法(如[[nodiscard]]、[[deprecated]])增强代码可读性与安全性;求值顺序明确化,提高程序可预测性。这些改进显著提升了代码的简洁性、安全性和可维护性。
OV9734 DATASHEET,完整规格书
OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等
【C++碎片化知识补充】C++ 里 int 也算对象?聊聊对象和变量的边界
盯着sessionId不就是个变量吗?变量凭什么能调用函数?后来才反应过来——它当然是对象。是我把对象这个词理解窄了。
数学建模模型总结
这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!
【C++ 基础入门】C++11新特性(下):可变参数模板、lambda 表达式与包装器
C++11高阶特性(可变参数模板与参数包展开、emplace_back、lambda表达式与捕获列表、仿函数、std::function包装器)
#SQLite 数据库笔记一:(概念 / 终端指令 / SQL 语句 / C 编程 / 回调函数)
数据库 = 数据的仓库,假设数据是海量。能力说明存储数据持久化保存,程序退出数据还在统计数据、分组、排序数据管理增、删、改、查(CRUD)嵌入式设备上也会用数据库(单片机网关、路由器、工业 HMI 都常见),因为 sqlite 体积小、无需服务进程、单文件即可。数据库 = 库 > 表 > 记录(行) > 字段(列)sqlite3 = 开源、C 写的、单文件、免安装、最多 2T 的嵌入式关系型数据库。
1-10 PostgreSQL中多表连接全解:inner/left/right/full/cross join
本文基于 PostgreSQL 15+ 完整拆解 5 种主流连接:内连接、左连接、右连接、全连接、笛卡尔连接。结合可落地的测试数据,演示每种连接的执行逻辑、返回结果,重点剖析 NULL 值对 JOIN 匹配的核心影响,彻底解决多表连接数据丢失、匹配异常、结果错乱的问题。
蓝桥杯·全国青少年信息素养大赛·电子学会Python/C++考级 备考:莫队算法离线区间查询详解
备赛进行时:第十八届蓝桥杯软件赛报名已于 2026-10-08 10:00 开启、12-18 14:00 截止,省赛定在 2027-04-10(C/C++·Python 程序设计 9:00–13:00);中国电子学会 2026 年 12 月软件编程(C/C++ 一级至十级、Python 一级至六级)考级报名 9/23–12/2 16:00、统考 12-12;全国青少年信息素养大赛 2026—2027 赛季算法应用主题赛也已进入复盘练兵窗口。
c++ explicit关键字详解
explicit。
825 mW 顶上 212 °C:ASM491S 的 105 °C/W、250 mA 短路电流与热关断
25 °C 环境里结温 34.1 °C,125 °C 环境里结温 134.1 °C——后者已经离 150 °C 只有 16 °C 了,但还在范围内。换个角度看同一件事:从 25 °C 和从 125 °C 起算,温升都是 86.6 °C,但一个到 111.6 °C(还在范围内),一个到 211.6 °C(远远超限)。这个算例里 20 °C/W 是我假设的,实际值取决于机壳材料、密封程度、有没有风扇,跨度可以从 5 °C/W 到 50 °C/W 以上。外面 50 °C 的机箱,盒内就是 63.9 °C。
CMake从入门到精通:多模块与配置文件实战
cmake实践领域推荐做法避免做法构建目录始终使用 out-of-source build (在源目录直接运行 cmake,导致生成大量垃圾文件源文件列表显式列出源文件过度依赖,导致新增文件后需重新运行 cmake变量作用域使用target_前缀命令 (如使用全局,污染所有目标的作用域库链接明确指定PUBLICPRIVATEINTERFACE默认不指定,导致依赖传递关系混乱C++ 标准使用或硬编码-std=c++11到通过上述模块化结构、自定义.cmake。
【C】Lesson3顺序表 链表
顺序表。
C++课后习题训练记录Day206
在一个城市,蓝泽是一个著名的侦探,他手上有一份秘密情报——一串由数字组成的密码。密码的解析从零开始,即第一个元素是 a0,第二个元素是 a1,依此类推。然而,这个密码有个特殊的设定,只有当偶数位置(a0,a2,a4,......)的元素之和达到最大值,才能解开密码的真正含义。在一行上输出一个整数 —— 在反转至多一个子数组(连续子段)后,偶数位置上的元素的最大可能总和。第二行包含 n 个整数 a0,a1,...,an−1。对此代码进行检验,检验后无报错,运行此代码,运行结果正确。
Windows 11 26H2 存储空间清理指南:C 盘瘦身、存储感知与深度清理实操
Windows 11 26H2 C 盘满了怎么清理?本文按四层顺序给出存储感知与清理建议配置、磁盘清理系统级勾选项、WinSxS 与保留存储的 DISM 精简命令,以及文件夹位置重定向和 C 盘无损扩容方法,全程用系统自带工具。
1万+



被折叠的 条评论
为什么被折叠?



