|
0 / 0 / 0
Регистрация: 11.02.2023
Сообщений: 19
|
|||||||||||
Изометрическая аксонометрическая проекция06.03.2023, 11:20. Показов 2803. Ответов 31
Здравствуйте. Создал сцену с геометрическими фигурами, сейчас нужно реализовать их отображение в изометрической аксонометрической проекции. Также необходимо добавить кнопку "Изометрическая проекция". Поизучал информацию, но так и не понял, как это сделать.
main.cpp
0
|
|||||||||||
| 06.03.2023, 11:20 | |
|
Ответы с готовыми решениями:
31
Диметрия, аксонометрическая проекция Аксонометрическая проекция Аксонометрическая проекция |
|
0 / 0 / 0
Регистрация: 11.02.2023
Сообщений: 19
|
|||||||
| 12.03.2023, 18:08 [ТС] | |||||||
|
Вот код:
0
|
|||||||
|
6353 / 3524 / 1428
Регистрация: 07.02.2019
Сообщений: 8,995
|
|||||||
| 12.03.2023, 18:26 | |||||||
draw:Кликните здесь для просмотра всего текста
0
|
|||||||
|
0 / 0 / 0
Регистрация: 11.02.2023
Сообщений: 19
|
|
| 12.03.2023, 18:41 [ТС] | |
|
0
|
|
|
6353 / 3524 / 1428
Регистрация: 07.02.2019
Сообщений: 8,995
|
||
| 12.03.2023, 18:48 | ||
draw();
0
|
||
|
0 / 0 / 0
Регистрация: 11.02.2023
Сообщений: 19
|
|||||||
| 12.03.2023, 19:01 [ТС] | |||||||
|
Кликните здесь для просмотра всего текста
main.cpp:7:1: error: expected unqualified-id before numeric constant
1 ^ main.cpp:241:14: error: 'NUM_COLORS' was not declared in this scope double color[NUM_COLORS][3] = { ^~~~~~~~~~ main.cpp:241:14: note: suggested alternative: 'NUMCOLORS' double color[NUM_COLORS][3] = { ^~~~~~~~~~ NUMCOLORS main.cpp: In function 'void draw_cube()': main.cpp:293:14: error: 'color' was not declared in this scope glColor3dv(color[R]); ^~~~~ main.cpp:293:20: error: 'R' was not declared in this scope glColor3dv(color[R]); ^ main.cpp:301:20: error: 'G' was not declared in this scope glColor3dv(color[G]); ^ main.cpp:309:20: error: 'Y' was not declared in this scope glColor3dv(color[Y]); ^ main.cpp:309:20: note: suggested alternative: 'CY' glColor3dv(color[Y]); ^ CY main.cpp:317:20: error: 'V' was not declared in this scope glColor3dv(color[V]); ^ main.cpp:325:20: error: 'B' was not declared in this scope glColor3dv(color[B]); ^ main.cpp:333:20: error: 'M' was not declared in this scope glColor3dv(color[M]); ^ main.cpp: In function 'void draw_octa()': main.cpp:349:14: error: 'color' was not declared in this scope glColor3dv(color[R]); ^~~~~ main.cpp:349:20: error: 'R' was not declared in this scope glColor3dv(color[R]); ^ main.cpp:354:20: error: 'DR' was not declared in this scope glColor3dv(color[DR]); ^~ main.cpp:354:20: note: suggested alternative: 'CD_R' glColor3dv(color[DR]); ^~ CD_R main.cpp:359:20: error: 'Y' was not declared in this scope glColor3dv(color[Y]); ^ main.cpp:359:20: note: suggested alternative: 'CY' glColor3dv(color[Y]); ^ CY main.cpp:364:20: error: 'DY' was not declared in this scope glColor3dv(color[DY]); ^~ main.cpp:364:20: note: suggested alternative: 'CY' glColor3dv(color[DY]); ^~ CY main.cpp:369:20: error: 'B' was not declared in this scope glColor3dv(color[B]); ^ main.cpp:374:20: error: 'DB' was not declared in this scope glColor3dv(color[DB]); ^~ main.cpp:374:20: note: suggested alternative: 'DCB' glColor3dv(color[DB]); ^~ DCB main.cpp:379:20: error: 'G' was not declared in this scope glColor3dv(color[G]); ^ main.cpp:384:20: error: 'DG' was not declared in this scope glColor3dv(color[DG]); ^~ main.cpp: In function 'int WinMain(HINSTANCE, HINSTANCE, LPSTR, int)': main.cpp:509:13: error: 'Draw' was not declared in this scope Draw(); ^~~~ main.cpp:509:13: note: suggested alternative: 'draw' Draw(); ^~~~ draw mingw32-make: *** [makefile:13: main.o] Error 1 C:\Users\Михаил\Desktop\123\var2>mingw32-make g++ -c -I"E:\Libs\glu\include" main.cpp main.cpp:7:1: error: expected unqualified-id before numeric constant 1 ^ main.cpp:241:14: error: 'NUM_COLORS' was not declared in this scope double color[NUM_COLORS][3] = { ^~~~~~~~~~ main.cpp:241:14: note: suggested alternative: 'NUMCOLORS' double color[NUM_COLORS][3] = { ^~~~~~~~~~ NUMCOLORS main.cpp: In function 'void draw_cube()': main.cpp:293:14: error: 'color' was not declared in this scope glColor3dv(color[R]); ^~~~~ main.cpp:293:20: error: 'R' was not declared in this scope glColor3dv(color[R]); ^ main.cpp:301:20: error: 'G' was not declared in this scope glColor3dv(color[G]); ^ main.cpp:309:20: error: 'Y' was not declared in this scope glColor3dv(color[Y]); ^ main.cpp:309:20: note: suggested alternative: 'CY' glColor3dv(color[Y]); ^ CY main.cpp:317:20: error: 'V' was not declared in this scope glColor3dv(color[V]); ^ main.cpp:325:20: error: 'B' was not declared in this scope glColor3dv(color[B]); ^ main.cpp:333:20: error: 'M' was not declared in this scope glColor3dv(color[M]); ^ main.cpp: In function 'void draw_octa()': main.cpp:349:14: error: 'color' was not declared in this scope glColor3dv(color[R]); ^~~~~ main.cpp:349:20: error: 'R' was not declared in this scope glColor3dv(color[R]); ^ main.cpp:354:20: error: 'DR' was not declared in this scope glColor3dv(color[DR]); ^~ main.cpp:354:20: note: suggested alternative: 'CD_R' glColor3dv(color[DR]); ^~ CD_R main.cpp:359:20: error: 'Y' was not declared in this scope glColor3dv(color[Y]); ^ main.cpp:359:20: note: suggested alternative: 'CY' glColor3dv(color[Y]); ^ CY main.cpp:364:20: error: 'DY' was not declared in this scope glColor3dv(color[DY]); ^~ main.cpp:364:20: note: suggested alternative: 'CY' glColor3dv(color[DY]); ^~ CY main.cpp:369:20: error: 'B' was not declared in this scope glColor3dv(color[B]); ^ main.cpp:374:20: error: 'DB' was not declared in this scope glColor3dv(color[DB]); ^~ main.cpp:374:20: note: suggested alternative: 'DCB' glColor3dv(color[DB]); ^~ DCB main.cpp:379:20: error: 'G' was not declared in this scope glColor3dv(color[G]); ^ main.cpp:384:20: error: 'DG' was not declared in this scope glColor3dv(color[DG]); ^~ main.cpp: In function 'int WinMain(HINSTANCE, HINSTANCE, LPSTR, int)': main.cpp:509:13: error: 'Draw' was not declared in this scope Draw(); ^~~~ main.cpp:509:13: note: suggested alternative: 'draw' Draw(); ^~~~ draw mingw32-make: *** [makefile:13: main.o] Error 1 Вот код, который получился вместе с вашим: Кликните здесь для просмотра всего текста
0
|
|||||||
|
6353 / 3524 / 1428
Регистрация: 07.02.2019
Сообщений: 8,995
|
|||
| 12.03.2023, 19:05 | |||
enum Colors просто на enum (8 строка)?
0
|
|||
|
0 / 0 / 0
Регистрация: 11.02.2023
Сообщений: 19
|
|||
| 12.03.2023, 19:18 [ТС] | |||
|
0
|
|||
|
6353 / 3524 / 1428
Регистрация: 07.02.2019
Сообщений: 8,995
|
||
| 12.03.2023, 19:29 | ||
|
Ну и тест глубины включи ( glEnable(GL_DEPTH_TEST)).
0
|
||
|
0 / 0 / 0
Регистрация: 11.02.2023
Сообщений: 19
|
||
| 12.03.2023, 20:19 [ТС] | ||
|
0
|
||
| 13.03.2023, 08:54 | |
|
Не по теме: Интересно, а такой же рез-т достигается просто вращением? По-моему да (для этого частного случая аксонометрии).
0
|
|
|
0 / 0 / 0
Регистрация: 11.02.2023
Сообщений: 19
|
||
| 13.03.2023, 14:03 [ТС] | ||
|
0
|
||
|
0 / 0 / 0
Регистрация: 11.02.2023
Сообщений: 19
|
|
| 13.03.2023, 14:28 [ТС] | |
|
Последнюю фигуру доделал сам. Всем спасибо, надеюсь, препода устроит
0
|
|
| 13.03.2023, 14:28 | |
|
Аксонометрическая проекция куба Диметрия, аксонометрическая проекция Изометрическая сетка из div-ов Проекция 3Д на 2Д Проекция Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |
|
Новые блоги и статьи
|
|||
|
Скрипты Tampermonkey для CyberForum, ChatGPT, Claude и пр.
Jin X 06.09.2026
Скрипты Tampermonkey для CyberForum, ChatGPT, Claude и пр.
Работая с форумом и нейросетями в браузере часто хочется что-то подкорректировать или добавить какого-то функционала.
Ниже прикреплён. . .
|
Программа опроса у.з. расходомера SLS-720F
Argus19 02.09.2026
Программа опроса у. з. расходомера SLS-720F
Программа опрашивает один раз в минуту три ультразвуковых расходомера SLS-720F через интерфейс RS-485 по протоколу Modbus RTU.
Опрашиваются регистры. . .
|
Hyper-V: Компьютер должен поддерживать доверенный платформенный модуль 2.0.
Maks 31.08.2026
При установке Windows 11 на виртуальную машину Hyper-V 2-го поколения вылезла такая ошибка:
Решение: в параметрах виртуальной машины, в разделе "Безопасность" (Security) активировать флаг. . .
|
Архитектура биовида Стива в Майнкрафте: Зачем бонобо кубический каннибализм
anaschu 30.08.2026
Кубический Вагинокапитализм в Minecraft: Математический инвариант ОДУ и рок Стивов-бонобо
Главная задача разработанной «Модели Всего» — наглядно продемонстрировать наличие системной «судьбы». . .
|
|
Оттачиваю умение писать js программы.
russiannick 30.08.2026
Проектом выходного дня стало написание Книги шифров Виженера. Итогом стала версия 200, синий туман.
Синий туман назван так, потому что замораживает текст под собой. Нажатие синих кнопок управляют. . .
|
мат медиц модель 30. презентация проекта
anaschu 27.08.2026
хоп хоп хоп хидахоп, а я кладую))
|
Как у меня протекала болезнь
zorxor 27.08.2026
Здравствуйте, друзья! Эта запись блога предназначена именно для вас - для моих дорогих друзей, которые знали меня лично. Чтобы ответить на вопрос - а что же со мной произошло на самом деле? Я учился. . .
|
Нашел вот забавное видео о измерениях. Лучшее что я видел на эту тему
kumehtar 26.08.2026
ILETXiw9bMQ
Основная суть и тезисы по измерениям:
0D (Нулевое измерение): точка, не имеющая длины, ширины, высоты или объема.
Объект не может перемещаться в 0D.
1D (Первое измерение):. . .
|