# optical_design
## 项目依赖
NGS -> (请设置`NAGISA_DIR`环境变量,该环境变量指向NGS工程的include目录,如"G:\Projects\C_CPP\Clion\NGS\include\")
opencv |
imgui |
sajson |-> (请设置`NAGISA_ROOT`环境变量,该变量指向root文件夹,如"G:\root\",root内容请在群中下载压缩包(体积有点大))
box2d |
## 属性表设置:
属性表可以很方便配置visual studio工程项目,但缺点是只能使用绝对路径
所以这里将其设置为路径"C:\configure\visual_studio",请将压缩包configure解压至该路径
## 项目介绍:
赛题可见"赛题.pdf"
本项目为跨平台项目,在windows/linux上进行调试,最后在开发板上运行
optical_design : 项目本体(header-only),无需经过编译
windows : windows运行环境
linux : linux运行环境
## 参考的工程结构:
xxx:/project/c_cpp/
|---NGS/
|---optical_design/
xxx:/root/ <- root.zip 解压至此(root.zip内可能只有include文件夹,此时替换掉include即可)
c:/configure/visual_studio/ <- configure.zip解压至此
## 详细流程:
1. 到 https://github.com/situNagisa/NGS 下载NGS工程
2. 到 https://github.com/situNagisa/optical_design 下载optical_design项目工程
3. 将NGS/include配置为环境变量`NAGISA_DIR`
4. 解压root.zip,并设置其为环境变量`NAGISA_ROOT`
![环境变量](./readme/env_var.png)
注意:结尾必须有个“\”号
#### 若环境变量配置失败则会出现以下问题:
![设置环境变量失败](./readme/set_env_var_fail.png)
5. 解压configure.zip至C:\configure\visual_studio\
![属性表](./readme/prop_table.png)
注意:若属性表配置失败则会出现以下问题,这时请检查环境变量`NAGISA_ROOT`是否配置成功
![属性表失败](./readme/prop_table_fail.png)
6. 设置启动项目为windows,尝试启动项目:
![启动工程](./readme/set_start_project.png)
## c/c++ vs知识补充
从c/c++源码到可执行文件(windows:.exe)需要经历`编译` `链接`过程
### 编译
编写代码的过程中经常需要包含头文件
```cpp
#include <iostream>
#include <concepts>
#include "NGS/NGS.h"
...
```
要到哪里去找这些头文件呢
- visual studio:
![右键](./readme/set_include_dir_step1.jpg)
![尖括号](./readme/set_include_dir_step2.jpg)![引号](./readme/set_include_dir_step3.jpg)
其中,`vc++目录`和`c/c++ -> 常规` 分别对应了`#include`的`尖括号`和`引号`的优先查找目录
前面我们有设置属性表,其作用就是根据系统已有的环境变量,设置`vc++目录`和`c/c++ -> 常规`查找路径
- gcc
gcc一般用的是控制台,用选项`-I`指定`引号`的优先查找目录,`尖括号`的优先查找目录在linux环境下为/root/include/(windows不清楚)
## 日志
[2023:07:11] 工程刚合并,有些bug,尽量在今天赶出来
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
全国大学生电子设计竞赛(National Undergraduate Electronics Design Contest),试题,解决方案及源码。计划或参加电赛的同学可以用来学习提升和参考。程序均是实战案例,经过测试可直接运行。 全国大学生电子设计竞赛(National Undergraduate Electronics Design Contest),试题,解决方案及源码。计划或参加电赛的同学可以用来学习提升和参考。程序均是实战案例,经过测试可直接运行。
资源推荐
资源详情
资源评论
收起资源包目录
光电赛.zip (376个子文件)
fileList.bin 244KB
fileList.bin 123KB
inflection_point.h_8602CA69F1867318.ifc.dt.module.json.command 5KB
inflection_point.h_8602CA69F1867318.ifc.dt.module.json.command 5KB
optical_design.h_76C5999320FCD0B8.ifc.dt.module.json.command 5KB
gyroscope.h_CE51801F9E98C210.ifc.dt.module.json.command 5KB
optical_design.h_76C5999320FCD0B8.ifc.dt.module.json.command 5KB
main_data.h_F13BB52B0C3E18C7.ifc.dt.module.json.command 5KB
device.h_5188BBF08E5F9E31.ifc.dt.module.json.command 5KB
screen.h_E10719ADEFB7975B.ifc.dt.module.json.command 5KB
camera.h_D04B2B9FFB529F3C.ifc.dt.module.json.command 5KB
engine.h_7500F308BBE47A41.ifc.dt.module.json.command 5KB
physic.h_5A9D687A93D49162.ifc.dt.module.json.command 5KB
gyroscope.h_CE51801F9E98C210.ifc.dt.module.json.command 5KB
grid.h_7F8ACCC8A18FFB3A.ifc.dt.module.json.command 5KB
node.h_13140B7DE5FAAFAE.ifc.dt.module.json.command 5KB
maze.h_FEF05AEDAED12BFD.ifc.dt.module.json.command 5KB
defined.h_52BE0932B5933228.ifc.dt.module.json.command 5KB
segment.h_DDCF268667DB62B.ifc.dt.module.json.command 5KB
ctrl.h_1F226AEB3D732A3B.ifc.dt.module.json.command 5KB
move.h_4660EC17512062F7.ifc.dt.module.json.command 5KB
data.h_782D5271871E6629.ifc.dt.module.json.command 5KB
path.h_70EE980CE7BF962E.ifc.dt.module.json.command 5KB
main_data.h_F13BB52B0C3E18C7.ifc.dt.module.json.command 5KB
screen.h_E10719ADEFB7975B.ifc.dt.module.json.command 5KB
device.h_5188BBF08E5F9E31.ifc.dt.module.json.command 5KB
camera.h_D04B2B9FFB529F3C.ifc.dt.module.json.command 5KB
engine.h_7500F308BBE47A41.ifc.dt.module.json.command 5KB
physic.h_5A9D687A93D49162.ifc.dt.module.json.command 5KB
grid.h_7F8ACCC8A18FFB3A.ifc.dt.module.json.command 5KB
node.h_13140B7DE5FAAFAE.ifc.dt.module.json.command 5KB
maze.h_FEF05AEDAED12BFD.ifc.dt.module.json.command 5KB
setting.h_7477460FAE110311.ifc.dt.module.json.command 5KB
defined.h_52BE0932B5933228.ifc.dt.module.json.command 5KB
maze.h_DC67C778B3B855BE.ifc.dt.module.json.command 5KB
ctrl.h_1F226AEB3D732A3B.ifc.dt.module.json.command 5KB
move.h_4660EC17512062F7.ifc.dt.module.json.command 5KB
data.h_782D5271871E6629.ifc.dt.module.json.command 5KB
path.h_70EE980CE7BF962E.ifc.dt.module.json.command 5KB
settings.h_D8BE08B5A0C79F7D.ifc.dt.module.json.command 5KB
sajson.h_AE484F5697F8BAE7.ifc.dt.module.json.command 5KB
defined.h_A7CC412AAED07B06.ifc.dt.module.json.command 5KB
setting.h_3E0B7BD3CEF61AF3.ifc.dt.module.json.command 5KB
draw.h_C2A224657B528276.ifc.dt.module.json.command 5KB
test.h_7A630B26AEC287F8.ifc.dt.module.json.command 5KB
gui.h_35A55814BBABF784.ifc.dt.module.json.command 5KB
main.cpp.ifc.dt.module.json.command 5KB
gyroscope.cpp.ifc.dt.module.json.command 5KB
ngs_hello.cpp.ifc.dt.module.json.command 5KB
settings.cpp.ifc.dt.module.json.command 5KB
main.cpp.ifc.dt.module.json.command 5KB
sajson.cpp.ifc.dt.module.json.command 5KB
engine.cpp.ifc.dt.module.json.command 5KB
camera.cpp.ifc.dt.module.json.command 5KB
screen.cpp.ifc.dt.module.json.command 5KB
draw.h_D280D5EE669230AE.ifc.dt.module.json.command 5KB
imgui.h_76D88337D775EED1.ifc.dt.module.json.command 5KB
vision.cpp.ifc.dt.module.json.command 5KB
draw.cpp.ifc.dt.module.json.command 5KB
test.cpp.ifc.dt.module.json.command 5KB
imgui.h_917829454CA98996.ifc.dt.module.json.command 5KB
gui.h_1322848981002B03.ifc.dt.module.json.command 5KB
main.cpp.ifc.dt.module.json.command 5KB
pch.h_D3844B25CC65B098.ifc.dt.module.json.command 5KB
ngs.cpp.ifc.dt.module.json.command 5KB
gyroscope.cpp.ifc.dt.module.json.command 5KB
engine.cpp.ifc.dt.module.json.command 5KB
vision.cpp.ifc.dt.module.json.command 5KB
screen.cpp.ifc.dt.module.json.command 5KB
camera.cpp.ifc.dt.module.json.command 5KB
main.cpp.ifc.dt.module.json.command 5KB
ngs.cpp.ifc.dt.module.json.command 5KB
imgui_impl_opengl3.cpp 43KB
imgui_impl_glfw.cpp 40KB
draw.cpp 14KB
test.cpp 13KB
settings.cpp 5KB
main.cpp 4KB
imgui.cpp 3KB
gyroscope.cpp 3KB
ngs_hello.cpp 1KB
camera.cpp 732B
engine.cpp 389B
screen.cpp 319B
OpticalDesigned.vcxproj.filters 3KB
windows.vcxproj.filters 2KB
vision.vcxproj.filters 831B
.gitattributes 66B
.gitignore 4KB
imgui_impl_opengl3_loader.h 35KB
maze.h 10KB
path.h 5KB
callback.h 5KB
main_data.h 4KB
test.h 4KB
imgui_impl_glfw.h 4KB
optical_design.h 3KB
vision.h 3KB
imgui_impl_opengl3.h 3KB
physic.h 3KB
共 376 条
- 1
- 2
- 3
- 4
资源评论
白话机器学习
- 粉丝: 9286
- 资源: 7681
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功