Hi Xavier,

for the translation you can use the matrix directly, perhaps we should add a getTranslate() method.

Real32 tx = evol[3][0];
Real32 ty = evol[3][1];
Real32 tz = evol[3][2];

Andreas

hello all,
I'm doing computation on the camera world and when i want to extract the translation of my matrix, as i have to do a "getTransform" i got the quaternion too. My probleme is that i got actually an OpenSG warning with this quaternion : "MatToQuat: BUG: |quat[4]| (1.012117) >> 1.0 !" wich slow my application ( "fprintf(stderr "...)

How can i fix that ?

My code :
Matrix mCam;
cameraPtr->getBeacon()->getToWorld(mCam);
Matrix mInvCamera = mCam;
mInvCamera.transpose();
Matrix evol;

 evol.setTransform(Vec3f(temp[0],temp[1],temp[2]));
// now get tranlation on world cam.
evol.mult(mInvCamera);
evol.multLeft(mCam);
 evol.getTransform(translation, rotation,
    scaleFactor, scaleOrientation);
...

Regards,

Xavier


-------------------------------------------------------
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





-------------------------------------------------------
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