Hi,

> On Fri, 2005-10-14 at 18:59 +0200, Antonio Bleile wrote:
> >
> > After checking with the testManipulators.cpp I inserted
> >
> > manMatrix.setIdentity();
> > manMatrix.setTransform( Vec3f(1.0f, 1.0f, 1.0f) );
> >
> > and since then the object seems to rotate around the x-axis.
> > What is this supposed to mean? Doesn't the Matrix
> > constructos initialize to identity?
>
> Looking at the code it does. Weird.
>

I traced down the "translation" bug of the Manipulator to the
OSGManipulator.cpp, around lin  e 505.:

// get the matrix of manipulator target
 t->getMatrix().getTransform( translation,
                                         rotation,
                                         scaleFactor,
                                         scaleOrientation );


// assign its tranlation part to centerV (the original author knows why...)
// translation can be (0,0,0) - an uncaught case.
            centerV            = translation;
// [snip, do some math]

// do a fatal calculus, dividing with 0 !!!
            Real32   s = handleScreenV.dot(mouseScreenV) / handleScreenVLen;

// the third parameter will be invalid and thus the whole matrix gets screwed
            doMovement(t,
                       coord,
                       s * getLength()[coord]*0.01,
                       translation,
                       rotation,
                       scaleFactor,
                       scaleOrientation );


Assigning to centerV the value Vec3f( 1.0, 1.0, 1.0 ) solves the problem,
but I don´t know if this is in the intention of the original author.

Anyway, the manipulator does not exactly what I was looking for, the
manipulation takes only place on one axis( tranlation/scale in x
or y or z, rotation around x, y or z)...

What I was looking for, was a trackball for the "you know what I mean"
standard interaction with objects in the scene graph...
Ok, I know it´s in the experimental bracnch, so, no problem...


Regards,

   Toni


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to