⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 linewidth.cpp

📁 最新osg包
💻 CPP
字号:
#if defined(_MSC_VER)    #pragma warning( disable : 4786 )#endif#include <osg/LineWidth>#include <osgDB/Registry>#include <osgDB/Input>#include <osgDB/Output>using namespace osg;using namespace osgDB;// forward declare functions to use later.bool LineWidth_readLocalData(Object& obj, Input& fr);bool LineWidth_writeLocalData(const Object& obj, Output& fw);// register the read and write functions with the osgDB::Registry.RegisterDotOsgWrapperProxy g_LineWidthProxy(    new osg::LineWidth,    "LineWidth",    "Object StateAttribute LineWidth",    &LineWidth_readLocalData,    &LineWidth_writeLocalData);bool LineWidth_readLocalData(Object& obj, Input& fr){    bool iteratorAdvanced = false;    LineWidth& lineWidth = static_cast<LineWidth&>(obj);    float data;    if (fr[0].matchWord("width") && fr[1].getFloat(data))    {        lineWidth.setWidth(data);        fr+=2;        iteratorAdvanced = true;    }    return iteratorAdvanced;}bool LineWidth_writeLocalData(const Object& obj, Output& fw){    const LineWidth& lineWidth = static_cast<const LineWidth&>(obj);    fw.indent() << "width " << lineWidth.getWidth() << std::endl;    return true;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -