View Full Version : Skewing with a matrix ?
I am a beginning opengl'r
I need to skew an object in the x.
IE the height*a factor get subtracted from the x...
How do I do this with a matrix ?
Any help greatly appreciated.
well... you can't http://www.opengl.org/discussion_boards/ubb/smile.gif the easiest way (I think) is to do this for each vertex's coordinates separately. Think: You would have to do glTraslatef() for each vertex, not mentioning it's impossible to do anything with matrix between glBegin() and glEnd()
06-13-2003, 09:40 AM
It sounds like you might be able to use a shear matrix. A shear matrix that does something like you're describing might look like this:
1 0 0 0
n 1 0 0
0 0 1 0
0 0 0 1
Thanks, that was exactly what I needed.
Need to pick up a guide on matrices.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.