Help with matrix transformations

Started by
2 comments, last by kajjait 17 years, 4 months ago
Suppose i have a quad glTranslated at 0,0,-100 with the following vertices: -20, -20 20, -20 20, 20 -20, 20 Say i translate the quad and scale it, how do i calculate new vertices positions ?
Advertisement
You are trying to compute object to world coordinates.

You should write your own matrix class.

WorldVertex = ScaleMatrix * RotationMatrix * Translation Matrix * Vertex;

Do you know any tutorial for this specific subject ? Thanks
lets say you have an object. inside of that object there is a matrix that defines the objects translation, orientation, and scale in 3d space. if you wanted to get a vert position in the world all you would have to do is multiply your vert position with your objects matrix, like WilyCoder said. if you arent too familiar with matrices you should pick up a linear algebra book. i think there are a few out there that focus on 3d graphics. in the mean time i found a pretty crappy linear algebra tutorial online here: matrix multiply

This topic is closed to new replies.

Advertisement