Exemple #1
0
    virtual bool run(void* objectPtr, osg::Parameters& inputParameters, osg::Parameters& outputParameters) const
    {
        if (inputParameters.empty()) return false;

        osg::Drawable* child = dynamic_cast<osg::Drawable*>(inputParameters[0].get());
        if (!child) return false;

        osg::Geode* geode = reinterpret_cast<osg::Geode*>(objectPtr);
        geode->addDrawable(child);

        return true;
    }
Exemple #2
0
    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;
    }
    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;
    }
    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;
    }
Exemple #5
0
    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();
        }
        osgUI::TabWidget* cb = reinterpret_cast<osgUI::TabWidget*>(objectPtr);
        cb->currentIndexChangedImplementation(index);

        return true;
    }
Exemple #6
0
    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;
    }