OSG:开头篇 介绍
一.OSG简介
二.OSG配置编译
OpenSceneGraph-3.6.2 : http://www.openscenegraph.org/index.php/download-section/stable-releases/
3rdParty_VS2017_v141_x64_V11_small.7z : http://www.openscenegraph.org/index.php/download-section/dependencies/
OpenSceneGraph-Data-3.4.0.zip : http://www.openscenegraph.org/index.php/download-section/data/
可能发生的错误:
1.更改CmakeList.txt
set (CMAKE_PREFIX_PATH "osg源代码路径")
2.3rdParty第三方库只编译32位即可
3.VS2010安装目录下的VC->bin中的cvtres.exe,把它重命名,例如我的做法是cvtres[backup].exe。具体原因自行百度COFF和LNK1123。
三.OSG组成模块
OSG主要包含4个库:OSG核心库(Core Library) OSG工具库(NodeKit) OSG插件库 OSG内省库(osgIntrospection)
1.OSG核心库
osg库:基本数据类,负责提供基本场景图类,构建场景图形节点(节点类 状态类 绘制类 向量和矩阵类),一些包含程序特定功能类(命令行解析和错误调试信息等)
2.OSG工具库
3.OSG插件库
4.OSG内省库
四.OSG流程
五.OSG模块
1.OpenThreads(线程模块)
2.osg(核心模块)
#include <osg/Node>
#include <osg/Geode>
#include <osg/Group>
#include <osg/Material>
#include <osg/Depth>
#include <osg/Projection>
#include <osg/MatrixTransform>
#include <osg/Camera>
#include <osg/io_utils>
#include <osg/BlendColor>
#include <osg/BlendFunc>
#include <osg/Point>
#include <osg/ComputeBoundsVisitor>
#include <osg/LineWidth>
3.osgAnimation(动画模块)
4.osgDB(数据库模块)
#include <osgDB/ReadFile>
#include <osgDB/WriteFile>
#include <osgDB/FileUtils>
#include <osgDB/FileNameUtils>
5.osgFX(效果模块)
#include <osgFX/Scribe>
6.osgGA(交互模块)
#include <osgGA/GUIEventHandler>
#include <osgGA/TrackballManipulator>
7.osgManipulator
#include <osgManipulator/Dragger>
#include <osgManipulator/TranslateAxisDragger>
osgManipulator.lib
osgManipulatord.lib
8.osgParticle
9.osgPresentation
10.osgQt
11.osgShadow
12.osgSim
13.osgTerrain
14.osgText(文本模块)
#include <osgText/Text>
15.osgUI
16.osgUtil(工具模块)
#include <osgUtil/Optimizer>
#include <osgUtil/LineSegmentIntersector> //线段相交类
17.osgViewer(视图模块)
#include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>
18.osgVolume
19.osgWidget
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)