Inside3D!
     

Standards for 2D transforming

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming
View previous topic :: View next topic  
Author Message
mk



Joined: 04 Jul 2008
Posts: 94

PostPosted: Fri Jun 18, 2010 5:55 pm    Post subject: Standards for 2D transforming Reply with quote

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?
_________________
Makaqu engine blog / website.

Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn.
Back to top
View user's profile Send private message
Zylyx_



Joined: 05 Dec 2007
Posts: 111
Location: scotland, uk

PostPosted: Fri Jun 18, 2010 10:52 pm    Post subject: Reply with quote

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
_________________
....noodle...
Back to top
View user's profile Send private message MSN Messenger
Zylyx_



Joined: 05 Dec 2007
Posts: 111
Location: scotland, uk

PostPosted: Fri Jun 18, 2010 10:54 pm    Post subject: Reply with quote

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
_________________
....noodle...
Back to top
View user's profile Send private message MSN Messenger
mh



Joined: 12 Jan 2008
Posts: 909

PostPosted: Fri Jun 18, 2010 11:17 pm    Post subject: Reply with quote

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! Very Happy
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
mk



Joined: 04 Jul 2008
Posts: 94

PostPosted: Fri Jun 25, 2010 6:53 am    Post subject: Reply with quote

Thanks, I'm going to study all that.
_________________
Makaqu engine blog / website.

Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group