ubpa / ustc_cg Goto Github PK
View Code? Open in Web Editor NEW00106501: Computer Graphics (Spring-Summer 2020)
License: MIT License
00106501: Computer Graphics (Spring-Summer 2020)
License: MIT License
Homeworks/2_ImageWarping/documents/1_RBF.md 公式中的q应为p
Homework 9 编译时会提示_deps/uscene-src/include/UScene/core/Cmpt中有h文件想要include, detail/dynamic_reflection/...,然而我重复尝试了多次,也在相关库里搜索,只在UScene的.gitignore中有dynamic_reflection的字段。
(HW4里的Uengine我貌似一直未能搞懂从那个按钮开始加载.obj文件,我的cmake成功加载了assimp和tinyxml2的库,故现在也没有把HW4,HW5调试,HW6也因此一直搁浅)
望解惑,谢谢
USTC_CGr\Homeworks\1_MiniDraw\documents\
下的项目编译后报错未发现Widgets目录下的头文件,错误信息如下fatal error C1083: 无法打开包括文件: “QtWidgets/QMainWindow”: No such file or directory
对比编译成功的hello项目并查询Ubpa_AddTarget
的定义,发现USTC_CG\Homeworks\1_MiniDraw\documents\example\src\example\CMakeLists.txt
有误
Ubpa_AddTarget(MODE "EXE" QT ON LIBS "Qt5::Widgets")
中的LIBS
应改为LIB
修改后编译通过
在\0_CppPratices\project\src\executables\3_TemplateDArray(\0_CppPratices\samples\src\executables\3_TemplateDArray)中,我在DArray.h和DArray.inl添加了如下类型转换函数声明和函数
public:template
operator DArray<To_do>();
template
template
DArray::operator DArray<To_do>(){
DArray<To_do> doing;
doing.SetSize(m_nMax);
for (size_t i = m_nMax; i > m_nSize; i--)
doing.DeleteAt(i);
for (size_t i = 0; i < m_nSize; i++)
doing.SetAt(i,(To_do)m_pData[i]);;
return doing;
};
但我函数里无法调用DArray<To_do> doing的private部分,您能帮我看看能怎样改吗
在这门课主页看到了课程录屏放在了贵校网盘上,竟然是开放下载,打算学习一下。但最早的2月份的几个视频文件已经损坏了,请问有备份吗,厚颜无耻的求一份哈哈🙋♂️
文件位置:Homeworks\0_CppPratices\samples\src\executables\2_EfficientDArray\DArray.cpp
问题描述:初始化时,变量m_nMax设置为0,pushback函数和insert函数对数组扩容时,直接通过m_nMax *= 2来实现,导致对空数组进行这两个操作时,陷入死循环
修改意见:改为 m_nMax = (m_nMax == 0 ? 1 : m_nMax * 2);
您好!从作业中收获匪浅!在配第 9 个作业的环境时碰到了问题,随后解决了,描述如下。
问题:在编译后的文件 "./bin/HW9_UEditord.exe" 在运行后为白框,无任何反应,编译无报错。
解决方案:在 ./_deps/uengine-src/core/Engine.cpp
文件中的 Engine::Init
函数的 window
的初始化调整到 glfwWindowHint
之前,即把第 55 行调整到 第 37 行前的位置。
(呜呜呜 终于配好环境了)
我现在在学习USTC-CG课程中,遇到了很多cmake跨平台的问题,我已经尽力修改,把他们汇总一下,UEngine在跨平台问题上有很多问题没有办法全部修改。
1.
更新前的USTC_CG/Homeworks/0_CppPratices/project/cmake/UbpaTool.cmake
更新前的USTC_CG/Homeworks/0_CppPratices/samples/cmake/UbpaTool.cmake
更新后无此问题
若不改,只有MSVC能运行,GCC,clang不行
RUNTIME DESTINATION "bin"
加一句LIBRARY DESTINATION "lib/${FOLDER_NAME}"
ARCHIVE DESTINATION "lib/${FOLDER_NAME}"
2.
OpenCV相关
若不改,只有Windows能运行,因为Windows上opencv的目录架构和其他的opencv略有不同
find_package(OpenCV REQUIRED)后加一句include_directories(${OpenCV_INCLUDE_DIRS})
若不改,只有编译(或者安装的二进制文件预编译)cmake时打开输出opencv_world库的开关才能编译
openCV_world 改为 ${OpenCV_LIBS}
3.OpenMP相关
USTC_CG/Homeworks/4_MinSurfMeshPara/project/CMakeLists.txt中的127-133行建议改为
find_package(OpenMP REQUIRED)
link_libraries(OpenMP::OpenMP_CXX)
(当然也可以,Ubpa_AddTarget中的LIBS加上OpenMP::OpenMP_CXX)
否则在clang下,即使取消了127-133行的注释依旧无法找到omp.h
4.UEngine相关
https://github.com/Ubpa/USTC_CG/blob/master/Homeworks/4_MinSurfMeshPara/project/setup.md中的Ubpa_20200318.zip中的UGM/include/UGM/Interfaces/IMatrix/IMatrix.h中inline static const Impl zero() noexcept中
内联静态函数用了this指针,但若按标准,非静态函数才能使用this指针,于是clang下还是没法编译,当然在新版的UGM下没有这个问题,但目录架构有点不一样,没想好怎么改成新版,如果需要,还可以说一下UEngine其他的跨平台问题,我现在暂时还没法用clang编译成功,报的错过于多了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.