Sign in to follow this  

How to modifiy ModelviewMatrix for shearing.

This topic is 4056 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

This topic is 4056 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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