Hi, Here 's my problem. I have a cylinder shape that I have added to my scenegraph. here a sample code:
I have declared instances in the headers. And I can display the cylinder. Code: rp_cylinder = new osg::Cylinder(); rp_cylinder->setHeight(1.0f); rp_cylinder->setRadius(100.0f); rp_cylinder->setRotation(osg::Quat( (M_PI / 2.0f),osg::Vec3(0.0f, 1.0f, 0.0f)) ); rp_CylinderDrawable = new osg::ShapeDrawable(rp_cylinder.get()); rp_cylinderGeode = new osg::Geode(); rp_cylinderGeode->addDrawable(rp_CylinderDrawableDebFen.get()); rp_position->addChild(rp_cylinderGeode.get()); But, I would like to modify the radius and height of the cylinder. So, I do: Code: osg::Cylinder * cylinder = static_cast<osg::Cylinder *>(rp_cylinderGeode->getDrawable(0)->getShape()); cylinder->setHeight(2.0f); But the problem is that nothing happen. No modification of the geometry. The address of the pointer is always the same so it is the same object. What 's wrong with my implementation ? Thank you![/code] ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17347#17347 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org