[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Perspective Projection
From:       Martin Graesslin <ubuntu () martin-graesslin ! com>
Date:       2008-07-24 14:12:04
Message-ID: 200807241612.11373.ubuntu () martin-graesslin ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


So next update ;-)

First of all: I just tested with twin view and there are no problems :-)

Now we can translate and rotate the screen with ScreenPaintData. You can define 
exactly one rotation and there is a new class for it:
class KWIN_EXPORT RotationData
    {
    public:
        RotationData();
        enum RotationAxis
            {
            XAxis,
            YAxis,
            ZAxis
            };
        RotationAxis axis;
        float angle;
        float xRotationPoint;
        float yRotationPoint;
        float zRotationPoint;
    };

To use it you have to specify the angle, the axis (default is z-Axis) and if 
you do not want to rotate around point (0/0/0) have to specify the coordinates 
for it. It is implemented in a way that there is first a glTranslate to the 
point, then the rotation and as a last step the translate is reverted.

I already ported cube effect to use this RotationData, so you can take a look 
at it to see how to use the rotation. It was quite some work to get cube 
working again. Now I know how Plasma devs must have felt in April ;-)

Lubos what do you think? Can it go into trunk or should I use a branch first 
and merge later on?

Next step is to introduce the same for WindowPaintData. So that we can rotate 
a window in that way. So coverswitch will become the example code. Although I 
will not start to change something there yet as it will be quite some work. I 
scheduled it for after GSoC.

["rotationdata_cube.diff.bz2" (application/x-bzip)]
["rotationdata.diff.bz2" (application/x-bzip)]
["signature.asc" (application/pgp-signature)]

_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic