Quote:
Originally Posted by farshizzo
We're hoping to finalize the new plugin interface before the final release. When that's ready there will be a more complete example of how to interact with your plugin objects from the Python script.
|
Ah, such a more complete example will definately be very welcome. I've just been experimenting with adding my own functions to the CustomDrawable object in the example code (my final aim is to provide to Vizard a rather extensive rendering library I normally use with a GLUT based program, so all I want to do is write a interface/wrapper).
This came out to be rather complicated
Am I doing this right? The below code shows the growing exprression (i send the pointers to cout to still if they're still valid or I've made a mistake).
Code:
cout << ((VizCustomNodeObj*)custom)->node << endl;
cout << osg::dynamic_pointer_cast<osg::Geode>(((VizCustomNodeObj*)custom)->node) << endl;
cout << osg::dynamic_pointer_cast<osg::Geode>(((VizCustomNodeObj*)custom)->node)->getDrawableList()[0] << endl;
cout << osg::dynamic_pointer_cast<CustomDrawable>(osg::dynamic_pointer_cast<osg::Geode>(((VizCustomNodeObj*)custom)->node)->getDrawableList()[0]) << endl;
osg::dynamic_pointer_cast<CustomDrawable>(osg::dynamic_pointer_cast<osg::Geode>(((VizCustomNodeObj*)custom)->node)->getDrawableList()[0])->ToggleAnimate();
I can now toggle whether the example object is stretched or not :P
Best,
Dee