[Marble-devel] Re: Rotate marble widget map
Torsten Rahn
tackat at t-online.de
Wed Jun 29 11:12:46 CEST 2011
On Thursday, 30. June 2011 09:57:22 Julien Nicolas wrote:
> Hi!
>
> I am using marble widget to develop an application and I would like to
> know if it's currently possible to rotate the map in order to make it
> head up instead of north up?
> And if it's possible how to do this?
I think it should still be possible - but only with the spherical projection.
IIRC there was a MarbleMap::rotateBy method at one point which took three
parameters. For whatever reasons it seems to be gone.
But you can take the rotateBy method that takes a Quaternion: You just need to
add the third angle:
Quaternion rotPhi( 1.0, deltaLat / 180.0, 0.0, 0.0 );
Quaternion rotTheta( 1.0, 0.0, deltaLon / 180.0, 0.0 );
Quaternion rotPsi( 1.0, 0.0, 0.0, orientation );
and multiply the axis with rotPsi. For the flat maps the implementation for
this is still missing.
Torsten
> Thanks a lot for your help
>
> Cordially,
More information about the Marble-devel
mailing list