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

📄 blendcolor.cpp

📁 最新osg包
💻 CPP
字号:
#include <osg/BlendColor>#include <osg/io_utils>#include <osgDB/Registry>#include <osgDB/Input>#include <osgDB/Output>using namespace osg;using namespace osgDB;// forward declare functions to use later.bool BlendColor_readLocalData(Object& obj, Input& fr);bool BlendColor_writeLocalData(const Object& obj, Output& fw);// register the read and write functions with the osgDB::Registry.RegisterDotOsgWrapperProxy g_BlendColorProxy(    new osg::BlendColor,    "BlendColor",    "Object StateAttribute BlendColor",    &BlendColor_readLocalData,    &BlendColor_writeLocalData);bool BlendColor_readLocalData(Object& obj, Input& fr){    bool iteratorAdvanced = false;    BlendColor& bc = static_cast<BlendColor&>(obj);    if (fr.matchSequence("constantColor %f %f %f %f"))    {        osg::Vec4 color;        fr[1].getFloat(color[0]);        fr[2].getFloat(color[1]);        fr[3].getFloat(color[2]);        fr[4].getFloat(color[3]);        bc.setConstantColor(color);        fr+=5;        iteratorAdvanced = true;    }    return iteratorAdvanced;}bool BlendColor_writeLocalData(const Object& obj, Output& fw){    const BlendColor& bc = static_cast<const BlendColor&>(obj);    fw.indent() << "constantColor " << bc.getConstantColor() << std::endl;    return true;}

⌨️ 快捷键说明

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