-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task 2. #86
base: master
Are you sure you want to change the base?
Task 2. #86
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Нужно еще поправить замечания из задачи 1
src/Voitov/Task2/CMakeLists.txt
Outdated
|
||
find_package(Qt5 COMPONENTS Widgets REQUIRED) | ||
|
||
add_executable(EXE ${SRC}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Название исполняемого файла нужно поправить
src/Voitov/Task2/cube.cpp
Outdated
auto position = QVector3D{0, 0, 0}; | ||
auto normal = QVector3D{0, 0, 0}; | ||
|
||
normal[coord] = int(side / 3 * 2) - 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c cast
нужно заменить на static_cast
src/Voitov/Task2/uiwindow.h
Outdated
GLint posAttr_ = 0; | ||
GLint matrixUniform_ = 0; | ||
|
||
geometry::figure* figures; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И пользуйте умные указатели
src/Voitov/Task2/uiwindow.h
Outdated
void init() override; | ||
void render() override; | ||
|
||
void addObj(geometry::figure *f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 варианта:
- Передавайте по значению(или rvalue ссылке), а затем делайте std::move
- Передавайте по указателю (умному)
изменено: src/Voitov/Task2/CMakeLists.txt изменено: src/Voitov/Task2/cube.cpp изменено: src/Voitov/Task2/cube.hpp удалено: src/Voitov/Task2/figure.cpp изменено: src/Voitov/Task2/figure.hpp новый файл: src/Voitov/Task2/figureinformation.cpp новый файл: src/Voitov/Task2/figureinformation.h изменено: src/Voitov/Task2/main.cpp изменено: src/Voitov/Task2/uiwindow.cpp изменено: src/Voitov/Task2/uiwindow.h Исправлено название исполняемого файла c cast заменен на static_cast в src/Voitov/Task2/cube.cpp Добавлен unique_ptr
78be5c8
to
d84256d
Compare
Features: c - cube color, b - background