Hi Dženan,

Actually I have the same intention as you. My approach was like that:

    osg::Vec3 achse;
    if (orientation == Qt::Horizontal) {
        achse = osg::Vec3(0.0, 0.0, 1.0);
    } else {
        achse = osg::Vec3(1.0, 0.0, 0.0);
    }
    osg::Matrixd myRotationMatrix;
    myRotationMatrix.makeRotate(osg::DegreesToRadians((float)newValue), 
achse);
    view->getCameraManipulator()->setByMatrix(trackballMatrix * 
myRotationMatrix);

Unfortunately this just rotates the model arround its origin. And I don't know 
how to change it the way I need. 
I guess I have to do some "translate * rotate * translate" sequence.

Maybe there is someone out there who can help.

- Werner -

On Friday 27 August 2010 22:26:41 DXXenan ZukiXX wrote:
> Hi,
> 
> Well I was sort of hoping I could get away without constructing camera
> matrix, as it involves "a bit" of computation.
> 
> If there is no quick and easy way to do it, I will just have to skip it (it
> is not that important for my project, as it is for debugging purposes).
> 
> Thank you!
> 
> Cheers,
> Dženan
> 
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=31117#31117
> 
> 
> 
> 
> 
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
TEXION Software Solutions

TEXION GmbH -  Rotter Bruch 26a  -  D 52068 Aachen - HRB 14999 Aachen
Fon: +49 241 475757-0, Fax: +49 241 475757-29, web: http://www.texion.eu

Geschäftsführer/Managing Director: Werner Modenbach
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to