Jump to content
  • Advertisement
Sign in to follow this  
ehmdjii

How to modifiy ModelviewMatrix for shearing.

This topic is 4272 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
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!