Superman[3 2 7 5] (Vector! Yes!) Needs Help
Can someone show me some applications for matrices in 2d graphics programming, or other facets of linear algebra being used in game programming. I just don't see where a lot of these topics are very useful yet?
Can someone show me some applications for matrices in 2d graphics programming, or other facets of linear algebra being used in game programming. I just don't see where a lot of these topics are very useful yet?
SFML uses matrices to position, rotate, and scale sprites. This matrix is used when rendering the sprites to transform the vertices into the right positions.
Also, please choose better thread titles. You don't need to put your name in it saying you need help (that's pretty obvious by the fact that you're creating a thread). Rather, help people know what it is you're asking about (for example, title it something like "Applications for matrices in 2D graphics programming?").
Sorry, I just felt kind of clever with that matrix (My name is a vector, get it! No, no, okay, I'm sorry). Yes, that makes sense, I'm using SFML though. If I was using SFML would there be a point in matrices or does SFML do all the matrix math for me.
Ah, I see, I missed the joke
Depends on what you want to do. It'll generally do the matrix stuff for you (i.e. you can say move/rotate/scale by this much and it'll manipulate the matrix for you), but if you want to shear or reflect or apply other affine transformations, you need to know how to do it yourself, as SFML doesn't supply helper methods for doing these things.
You also need to understand how matrices work, at least, because when you concatenate matrices (i.e. multiply them together into one matrix), order is important. You need to at least understand if you should rotate before translating, for example, and in which order to combine different matrices in order to get the right effect (or else you'll get it backwards).
You don't have to know a ton of linear algebra to use SFML or similar libraries that'll handle much of the matrix manipulating for you, but it certainly helps.
Sorry, I just felt kind of clever with that matrix (My name is a vector, get it! No, no, okay, I'm sorry). Yes, that makes sense, I'm using SFML though. If I was using SFML would there be a point in matrices or does SFML do all the matrix math for me.
Depends on what you want to do. It'll generally do the matrix stuff for you (i.e. you can say move/rotate/scale by this much and it'll manipulate the matrix for you), but if you want to shear or reflect or apply other affine transformations, you need to know how to do it yourself, as SFML doesn't supply helper methods for doing these things.
You also need to understand how matrices work, at least, because when you concatenate matrices (i.e. multiply them together into one matrix), order is important. You need to at least understand if you should rotate before translating, for example, and in which order to combine different matrices in order to get the right effect (or else you'll get it backwards).
You don't have to know a ton of linear algebra to use SFML or similar libraries that'll handle much of the matrix manipulating for you, but it certainly helps.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement