随笔分类 -  OSG

摘要:#include <Windows.h> #include <iostream> #include <string> #include <osg/Node> #include <osg/Group> #include <osg/Geode> #include <osgViewer/Viewer> # 阅读全文
posted @ 2021-09-08 15:51 暹罗吹雪 阅读(69) 评论(0) 推荐(0)
摘要:#include <Windows.h> #include <osg/Node> #include <osg/Group> #include <osg/Geode> #include <osg/Fog> #include <osgViewer/Viewer> #include <osgGA/Stat 阅读全文
posted @ 2021-09-08 15:42 暹罗吹雪 阅读(51) 评论(0) 推荐(0)
摘要:1 前视图(正视图) 2 后视图 3 右视图 4 左视图 5 上视图(顶视图) 6 下视图(仰视图) class ViewManipulator : public osgGA::TrackballManipulator { public: virtual bool handle(const osgG 阅读全文
posted @ 2021-09-07 19:12 暹罗吹雪 阅读(126) 评论(0) 推荐(0)
摘要:osg::Camera* createHUDCamera(double left, double right, double bottom, double top) { osg::ref_ptr<osg::Camera> camera = new osg::Camera(); camera->set 阅读全文
posted @ 2021-09-07 19:05 暹罗吹雪 阅读(293) 评论(0) 推荐(0)
摘要:光源类型 定向光 当一个光源很远的时候,来自光源的每条光线接近于平行。这看起来就像所有的光线来自于同一个方向,无论物体和观察者在哪儿。当一个光源被设置为无限远时,它被称为定向光(Directional Light),因为所有的光线都有着同一个方向;它会独立于光源的位置。 //光源位置 第四个参数 0 阅读全文
posted @ 2021-09-07 17:58 暹罗吹雪 阅读(706) 评论(0) 推荐(0)
摘要:生成uv坐标; 计算LLA坐标; 生成纹理坐标; 设置纹理; #include <Windows.h> #include <osg\Node> #include <osg\Group> #include <osg\Geometry> #include <osg\MatrixTransform> #i 阅读全文
posted @ 2021-09-02 21:39 暹罗吹雪 阅读(127) 评论(0) 推荐(0)
摘要:显示文本; 显示纹理; #include <Windows.h> #include <osg/Node> #include <osg/Group> #include <osg/Geode> #include <osg/Camera> #include <osg/Texture2D> #include 阅读全文
posted @ 2021-09-02 21:22 暹罗吹雪 阅读(89) 评论(0) 推荐(0)
摘要:#include <Windows.h> #include <osg/Node> #include <osg/Group> #include <osg/Geode> #include <osg/Switch> #include <osg/MatrixTransform> #include <osg/ 阅读全文
posted @ 2021-08-28 21:03 暹罗吹雪 阅读(81) 评论(0) 推荐(0)
摘要:#include <Windows.h> #include <osg\Node> #include <osg\Group> #include <osg\Geometry> #include <osg\MatrixTransform> #include <osg\NodeCallback> #incl 阅读全文
posted @ 2021-08-28 14:06 暹罗吹雪 阅读(54) 评论(0) 推荐(0)
摘要:选中节点高亮显示 #include <Windows.h> #include <osg/Node> #include <osg/Group> #include <osg/Geode> #include <osg/Switch> #include <osgFX/Scribe> #include <os 阅读全文
posted @ 2021-08-28 12:12 暹罗吹雪 阅读(82) 评论(0) 推荐(0)
摘要:查找节点名称 #include <Windows.h> #include <osg\Node> #include <osg\Group> #include <osg\Geometry> #include <osgViewer/Viewer> class FindNameVisitor : publi 阅读全文
posted @ 2021-08-27 22:58 暹罗吹雪 阅读(58) 评论(0) 推荐(0)
摘要:#include <Windows.h> #include <osg\Node> #include <osg\Group> #include <osg\Geometry> #include <osgViewer/Viewer> osg::Vec3Array* createVertexArray() 阅读全文
posted @ 2021-08-27 22:39 暹罗吹雪 阅读(122) 评论(0) 推荐(0)
摘要:矩阵缩放 矩阵旋转 矩阵平移 #include <Windows.h> #include <osg\Node> #include <osg\Group> #include <osg\Geometry> #include <osg\MatrixTransform> #include <osgViewe 阅读全文
posted @ 2021-08-25 17:04 暹罗吹雪 阅读(68) 评论(0) 推荐(0)
摘要:手动生成纹理坐标 自动生成纹理坐标 纹理与颜色结合 #include <windows.h> #include <osg\node> #include <osg\group> #include <osg\geometry> #include <osg\matrixtransform> #includ 阅读全文
posted @ 2021-08-25 16:40 暹罗吹雪 阅读(84) 评论(0) 推荐(0)
摘要:模式 点显示 osgPolygonModePOINT 线显示 osgPolygonModeLINE 面显示 osgPolygonModeFILL 关于 setRenderBinDetails 与setRenderingHint 的关系 为了简化操作,用户程序还可以使用StateSet::setRen 阅读全文
posted @ 2021-08-25 16:23 暹罗吹雪 阅读(216) 评论(0) 推荐(0)
摘要:#include <Windows.h> #include <osg\Node> #include <osg\Group> #include <osg\Geometry> #include <osgViewer/Viewer> #include <osgViewer/ViewerEventHandl 阅读全文
posted @ 2021-08-24 17:33 暹罗吹雪 阅读(146) 评论(0) 推荐(0)
摘要:#include <Windows.h> #include <iostream> #include <osgViewer/Viewer> #include <osgDB/ReadFile> #include <osg/Texture2D> #include <osg/ShapeDrawable> # 阅读全文
posted @ 2021-08-21 12:05 暹罗吹雪 阅读(56) 评论(0) 推荐(0)