HI Antoine, On 12/11/06, Antoine Rennuit <[EMAIL PROTECTED]> wrote:
I have created an osg::Geometry that I display with no problem. At the moment I change the color of this Geometry creating a new array of colors and calling setColorArray(myNewColorsArray) on the Geometry each time I need. But I wondered if the memory was well managed: is the previous array of colors (set at the previous call to setColorArray) deleted automatically with my method?
The OSG uses display lists by default, so if you update the data you need to call geometry->dirtyDisplayList() to ensure that it knows to update its display lists. Alternatively just turn off display lists via geometry->setUseDisplayList(false), particularly if you plan to update the geometry regularly as display list generation is a slow.
And last, I have a frame orientation 1 with respect to frame 0, given by quaternion 0q1. Now I want to rotate this orientation 1 around its own x axis (a rotation of frame 1 around x1) - the rotation around the x axis of whatever frame being given by qx. What I have done in most other 3D packages, and the theory gives 0q1 * qx for my new orientation (* being the quaternion multiplication). What I had to do in osg to obtain the desired final orientation was the commuted multiplication qx * 0q1. Any idea why?
The OSG uses the post multiple form of : v' = v * M Rather than v' = M * v Which you are possibly used to. Robert. _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
