How to modifiy ModelviewMatrix for shearing.
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!
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement