Merge lp://qastaging/~hikiko/compiz/compiz.glvector-fixes into lp://qastaging/compiz/0.9.12

Proposed by Eleni Maria Stea
Status: Merged
Approved by: Stephen M. Webb
Approved revision: 3928
Merged at revision: 3939
Proposed branch: lp://qastaging/~hikiko/compiz/compiz.glvector-fixes
Merge into: lp://qastaging/compiz/0.9.12
Diff against target: 207 lines (+25/-28)
4 files modified
plugins/animation/src/glide.cpp (+4/-6)
plugins/expo/src/expo.cpp (+2/-2)
plugins/opengl/include/opengl/vector.h (+1/-1)
plugins/opengl/src/vector.cpp (+18/-19)
To merge this branch: bzr merge lp://qastaging/~hikiko/compiz/compiz.glvector-fixes
Reviewer Review Type Date Requested Status
Stephen M. Webb Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+251421@code.qastaging.launchpad.net

Commit message

Change in GLVector implementation

Bug:
The GLVectors of compiz are 4 dimensional (x, y, z, w): https://en.wikipedia.org/wiki/Homogeneous_coordinates The w coordinate should be initialized to 1 and be preserved when we perform vector operations (additions/multiplications etc) otherwise the transformations won't be correct. For example: if we add or subtract the w values during two vectors addition we might have unexpected projections when the new w value is > 1 or divisions by 0 (when the new w is 0) because opengl divides the x,y,z values by w.

Solution:
- Changed the constructors to initialize w to 1 and not to 0 by default.
- Fixed the vector operations to use the x, y, z coordinates only.
- Fixed the existing constructors in plugins to initialize w to 1 and not to 0.

Description of the change

Change in GLVector implementation

Bug:
The GLVectors of compiz are 4 dimensional (x, y, z, w): https://en.wikipedia.org/wiki/Homogeneous_coordinates The w coordinate should be initialized to 1 and be preserved when we perform vector operations (additions/multiplications etc) otherwise the transformations won't be correct. For example: if we add or subtract the w values during two vectors addition we might have unexpected projections when the new w value is > 1 or divisions by 0 (when the new w is 0) because opengl divides the x,y,z values by w.

Solution:
- Changed the constructors to initialize w to 1 and not to 0 by default.
- Fixed the vector operations to use the x, y, z coordinates only.
- Fixed the existing constructors in plugins to initialize w to 1 and not to 0.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Stephen M. Webb (bregma) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches