Hi,

I'd like to change the Position of an Object in my Scene after picking it by mouse picking. I already have a ref_ptr, call it m_Node, pointing to the Object I want to move, but I don't know how to apply the changes correctly. I don't want to insert another MatrixTransform, I'd like to modify the original one to translate the Object to the new position.

In my .osg File it looks something like this:

MatrixTransform {
   DataVariance STATIC
   name "Moon"
... Matrix {
     1 0 0 0
     0 1 0 0
     0 0 1 0
     30 0 0 1
   }
   num_children 1
   Geode {......}
}

and I want to apply the changes so that I have

...
   Matrix {
     1 0 0 0
     0 1 0 0
     0 0 1 0
     30+x 0+y 0+z 1
   }
...

in the .osg File after saving it back. Vec3(x,y,z) is th amount by which I'd like to move the object.
Thanks for any help

- Tim -
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to