[osg-users] Resize a shape?

Patrick Maier maierp at gmx.net
Tue Oct 23 15:47:43 PDT 2007

I'm new to this list and to openscenegraph and I've a question regarding a  
problem and I don't know how to solve it.
It should be really trivial, but I don't get it managed, and google or  
other searches could not help me.

I've a cylinder, and while showing the scene, I want to change the size  
(height) of the cylinder.
I tried it that way, but only the first call of setting the height is a  
success (so the height of the cylinder stays at 0.1):

osg::Geode* possible_binding = new osg::Geode();
osg::Cylinder* possible_binding_shape = new  
osg::Cylinder(osg::Vec3(0,0,0), 0.4, 1.0);
osg::ShapeDrawable* possible_binding_drawable = new  


float i = 0;
	i += 0.1f;
	std::cout << "Main: " <<  
<< std::endl;

What am I doing wrong?
Sorry if this should be a trivial question, but I don't know the answer.

Thanks a lot!

More information about the osg-users mailing list