Standards for 2D transforming
Moderator: InsideQC Admins
5 posts
• Page 1 of 1
Standards for 2D transforming
I've been studying some 2D transforming techniques, and the AffineTransform class in Java's AWT seems really powerful, easy and flexible.
I'd like to code a 2D transformation class/library as flexible as that, but it occurred to me that there may already be some well-adopted standards for this in OpenGL, Direct3D or somewhere else. So, what I'm looking for is to code my library in a way that allows it to be easily replaced by or integrated with the pipeline of other 2D transforming libraries.
Any suggestions?
I'd like to code a 2D transformation class/library as flexible as that, but it occurred to me that there may already be some well-adopted standards for this in OpenGL, Direct3D or somewhere else. So, what I'm looking for is to code my library in a way that allows it to be easily replaced by or integrated with the pipeline of other 2D transforming libraries.
Any suggestions?
-

mankrip - Posts: 915
- Joined: Fri Jul 04, 2008 3:02 am
Everything is done 3D, even things that seem to be 2D transformations they are done in 3D. There is no point in writing a matrix library/interface, since there are so many well written and free to use ones out there. Also, unless you know exactly what you are doing, chances are you are gonna end up with half assed matrix class that works not even half as well as other matrix operation classes out there.
Same goes for vector, quaternion and other misc maths functionality. OpenGL already provides a standardazied method for performing 2D rendering in a 3D scene.
http://www.opengl.org/resources/faq/technical/transformations.htm
Same goes for vector, quaternion and other misc maths functionality. OpenGL already provides a standardazied method for performing 2D rendering in a 3D scene.
http://www.opengl.org/resources/faq/technical/transformations.htm
....noodle...
- Zylyx_
- Posts: 111
- Joined: Wed Dec 05, 2007 6:52 pm
- Location: scotland, uk
If you do really want to get your hands dirty, my personal recommendation:
http://www.amazon.co.uk/Essential-Mathematics-Games-Interactive-Applications/dp/0123742978/ref=sr_1_1?ie=UTF8&s=books&qid=1276901627&sr=1-1
http://www.amazon.co.uk/Essential-Mathematics-Games-Interactive-Applications/dp/0123742978/ref=sr_1_1?ie=UTF8&s=books&qid=1276901627&sr=1-1
....noodle...
- Zylyx_
- Posts: 111
- Joined: Wed Dec 05, 2007 6:52 pm
- Location: scotland, uk
Direct3D comes with an incredibly rich set of matrix routines that cover just about anything you might want to do, are hyper-optimised, will give you SSE/etc support, and so on. They can even be linked to an OpenGL (or general math) program and used in that as they don't require a Device to be created. No D3D programmer in their right mind would use anything else; they might wrap them to handle conversion from in-game data types to D3D data types, and they might write special-case versions for specific circumstances that a generic library can't foresee, but otherwise why reinvent the wheel?
Unless it's fun of course, in which case by all means power ahead!
Unless it's fun of course, in which case by all means power ahead!
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest