Hello Keyan,

On 08/26/2011 06:10 AM, Keyan wrote:
> in my application, I am currently using the TrackballEngine, but I would like 
> to extend it by a simple function.
>
> Let's say, it should be triggered by pressing SHIFT + LeftButton.
>
> What I want to have is the following. While holding down SHIFT + left mouse 
> button, the navigator should rotate around it's up vector. Imagine a tripod 
> mounted camera, where the cameraman only rotates the camera left and right, 
> not up and down.
>
> I tried for a while now, but couldn't find a working solution.

is the problem with using SHIFT + button to trigger the rotation or 
computing the rotation itself?
In the latter case, do you want to rotate around the current (local) up 
axis or one defined in world space?
For rotating around the local up axis you just multiply a rotation 
around that axis onto the current matrix (_tMatrix for TrackballEngine).
For rotating around an axis defined in world space, multiply it by the 
inverse of the current matrix (to bring it from world to local 
coordinates) then rotate around that axis.

        Cheers,
                Carsten

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to