How to modifiy ModelviewMatrix for shearing.

Started by
1 comment, last by ehmdjii 17 years, 5 months ago
Hello, I want to perform a shear (skew) on one of my objects along a give axis by a given angle. How would i do that? I think i would have to modifiy the current modelview matrix and i think its the 4th, 5th and 6th component, but i am not certain and have no idea what exactly they influence. Thanks!
Advertisement
Searching for "3d shear matrix" in Google gave me this pretty good result. This other result gives you the 3 shearing planes digested.

As OpenGL does not have a command for shearing transformation, you should make your own matrix and load it with glLoadMatrix(). You could, as well, do it with a vertex program, but that's only if you feel like learning that :-).

Cheers,

Ciro.
Ciro Durán :: My site :: gamedev.net :: AGS Forums
thank you!

This topic is closed to new replies.

Advertisement