Hey there!
I'm a newbie with OpenSG and at the moment I'm trying to deal with
transformations.
I've generated three boxes which should move independently by pressing a
key. This works so far, but actually I have a problem with those
translations.
Right now if I press the key to activate the translation the result is the
new order of the boxes. The movement to this position is unfortunately not
visible.
I know that I have to make this dependent from
Real32 time = glutGet(GLUT_ELAPSED_TIME);
but if I do this, the movement is endless. My wish is to have a translation
from point x to point y. I thought to use a loop like this:
Vec3f rot1 = (osgsin(time / 1000.f),
osgcos(time / 1000.f), //this is only an
example for a translation dependent on 'time'
osgsin(time / 1000.f));
Matrix r,p,q; // p should
be the result-matrix, r and q are just for help
q.setTransform(Vec3f(0,1,0));
Vec3f v = (Vec3f(2,1,0));
while (q.getTransform != v){
r.setTransform(rot1);
r.mult(q);
p.setValue(r);
}
but actually I don't know how to handle 'getTransform' and besides I'm not
sure if I'm on the right way or if there are maybe some existing functions
yet??! I've just spent far too much time with this problem, that's why I'm
hoping for help here :D
Ok, thanks for helping!
Greetings, alex
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users