Hi Dženan,
I don't know if it is still of interest for you. If not, maybe someone else
can profit. Here is my solution for turning the camera arround the scene:
osg::Vec3 achse;
osg::Matrix rotation_matrix(view->trackball->getRotation());
if (orientation == Horizontal) {
achse = osg::Vec3(0.0, 1.0, 0.0);
} else {
achse = osg::Vec3(1.0, 0.0, 0.0);
}
achse = achse * rotation_matrix;
osg::Quat myRotationMatrix;
myRotationMatrix.makeRotate(osg::DegreesToRadians((float)newValue),
achse);
view->trackball->setRotation(trackballMatrix * myRotationMatrix);
This works excellent for me.
- Werner -
On Monday 30 August 2010 13:22:08 DXXenan ZukiXX wrote:
> Hi,
>
> I can tell you immediately that I gave up on this :D
>
> Cheers,
> Dženan
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=31152#31152
>
>
>
>
>
> _______________________________________________
> 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