Sign in to follow this  
ehmdjii

How to modifiy ModelviewMatrix for shearing.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this