![]() |
|
Location of 3D in 2D - Printable Version +- iDevGames Forums (http://www.idevgames.com/forums) +-- Forum: Development Zone (/forum-3.html) +--- Forum: Graphics & Audio Programming (/forum-9.html) +--- Thread: Location of 3D in 2D (/thread-2027.html) |
Location of 3D in 2D - bmantzey - Dec 17, 2008 11:04 AM I wasn't sure what to title this one, and I'm not having any luck finding any info about this out there. I had a hard enough time getting my 3D meshes to draw in an Orthographic projection. So, I have these 3D objects drawing in an orthographic projection. I figured out that translating them is a little bit different because although there is a Z, you can't see any changes until it reaches a clipping plane and the unit of movement is different. Since the units are different, I'm clueless as to how I can determine the object's size on screen or how I could determine a certain position in the mesh at all times through rotations and all. Does anyone have any info as to how I can measure 3D objects drawn in an orthographic scene and most importantly, always identify a specific location in that mesh regardless of rotation or position? What I need is the screen space information about the objects. Thanks in advance! Location of 3D in 2D - ThemsAllTook - Dec 17, 2008 11:16 AM http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/glu/project.html Location of 3D in 2D - bmantzey - Dec 17, 2008 10:53 PM Oooh, no glu for me. I'm doing an iPhone game.
Location of 3D in 2D - arekkusu - Dec 17, 2008 11:45 PM Then you need to learn linear algebra, and implement software transform. Location of 3D in 2D - bmantzey - Dec 18, 2008 12:07 AM I have some knowledge of linear algebra. Thanks for narrowing it down for me. I'll just go ahead with that software transform right away. Thanks for your help, now I know exactly what to do now. Location of 3D in 2D - AnotherJake - Dec 18, 2008 12:34 AM Or you can grab it from the mesa source. (I never remember where that is, sorry... try google )[edit] ... silly me, try: http://www.mesa3d.org/ Location of 3D in 2D - ThemsAllTook - Dec 18, 2008 07:59 AM http://cgit.freedesktop.org/mesa/mesa/tree/src/glu/sgi/libutil/project.c Code: static void __gluMultMatrixVecd(const GLdouble matrix[16], const GLdouble in[4],Location of 3D in 2D - bmantzey - Dec 18, 2008 10:05 PM Very helpful and greatly appreciated, thank you Took and Jake. |