[osg-users] Resize a shape?

Patrick Maier maierp at gmx.net
Wed Oct 24 23:47:39 PDT 2007

>>> 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):
>> ...
>> Is this the normal way to do so, or is this inefficient and there is a
>> better way to resize a cylinder/shape?
> Another way to resize the shape is to put a Transform  
> (osg::MatrixTransform or osg::PositionAttitudeTransform)
> node above your Geode and set the scale on that.
> (Maybe you already have a Transform to move the shape around?)

Yes I have one.

> It probably depends on how often you want to change the shape.

I update the shape about every 5th frame(), so I think the scale would be  
the best way.

So thanks for the help :-)


More information about the osg-users mailing list