摘要: 模板模式 阶段1 //程序库开发人员 class Library { public: void step1(); void step3(); void step5(); } //应用程序开发人员 class Application { public: bool step2(); bool step4 阅读全文
posted @ 2021-10-04 17:46 暹罗吹雪 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 策略模式 定义一系列算法,把它们一个个封装起来,并且使它们可互相替换(变化)。该模式使得算法可独立于使用它的客户程序(稳定)而变化(扩展,子类化)。 阶段一 enum TaxBase{ CN_TAX, US_TAX, DE_TAX, }; class SalesOrder{ public: doub 阅读全文
posted @ 2021-10-04 17:43 暹罗吹雪 阅读(29) 评论(0) 推荐(0) 编辑
摘要: #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 暹罗吹雪 阅读(50) 评论(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 暹罗吹雪 阅读(40) 评论(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 暹罗吹雪 阅读(78) 评论(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 暹罗吹雪 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 光源类型 定向光 当一个光源很远的时候,来自光源的每条光线接近于平行。这看起来就像所有的光线来自于同一个方向,无论物体和观察者在哪儿。当一个光源被设置为无限远时,它被称为定向光(Directional Light),因为所有的光线都有着同一个方向;它会独立于光源的位置。 //光源位置 第四个参数 0 阅读全文
posted @ 2021-09-07 17:58 暹罗吹雪 阅读(582) 评论(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 暹罗吹雪 阅读(81) 评论(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 暹罗吹雪 阅读(81) 评论(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 暹罗吹雪 阅读(54) 评论(0) 推荐(0) 编辑