本文整理汇总了C++中osg::Parameters::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ Parameters::push_back方法的具体用法?C++ Parameters::push_back怎么用?C++ Parameters::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osg::Parameters
的用法示例。
在下文中一共展示了Parameters::push_back方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: run
virtual bool run(void* objectPtr, osg::Parameters& inputParameters, osg::Parameters& outputParameters) const
{
if (inputParameters.empty()) return false;
osg::Object* indexObject = inputParameters[0].get();
osg::UIntValueObject* uivo = dynamic_cast<osg::UIntValueObject*>(indexObject);
if (!uivo) return false;
osg::Geode* geode = reinterpret_cast<osg::Geode*>(objectPtr);
outputParameters.push_back(geode->getDrawable(uivo->getValue()));
return true;
}
示例2: run
virtual bool run(void* objectPtr, osg::Parameters& inputParameters, osg::Parameters& outputParameters) const
{
if (inputParameters.empty()) return false;
unsigned int index = 0;
osg::ValueObject* indexObject = inputParameters[0]->asValueObject();
if (indexObject) indexObject->getScalarValue(index);
osg::Geode* geode = reinterpret_cast<osg::Geode*>(objectPtr);
outputParameters.push_back(geode->getDrawable(index));
return true;
}
示例3: run
virtual bool run(void* objectPtr, osg::Parameters& inputParameters, osg::Parameters& outputParameters) const
{
if (inputParameters.empty()) return false;
unsigned int index = 0;
osg::ValueObject* indexObject = inputParameters[0]->asValueObject();
if (indexObject) indexObject->getScalarValue(index);
osg::Switch* sw = reinterpret_cast<osg::Switch*>(objectPtr);
outputParameters.push_back(new osg::BoolValueObject("return", sw->getValue(index)));
return true;
}
示例4: run
virtual bool run(void* objectPtr, osg::Parameters& inputParameters, osg::Parameters& outputParameters) const
{
if (inputParameters.empty()) return false;
osg::Object* indexObject = inputParameters[0].get();
unsigned int index = 0;
osg::DoubleValueObject* dvo = dynamic_cast<osg::DoubleValueObject*>(indexObject);
if (dvo) index = static_cast<unsigned int>(dvo->getValue());
else
{
osg::UIntValueObject* uivo = dynamic_cast<osg::UIntValueObject*>(indexObject);
if (uivo) index = uivo->getValue();
}
osg::Switch* sw = reinterpret_cast<osg::Switch*>(objectPtr);
outputParameters.push_back(new osg::BoolValueObject("return", sw->getValue(index)));
return true;
}