Ex3d is a dll i built that might be useful for making 3d games
it can convert 3d coordinates to 2d screen space and screen coordinates to 3d world coordinates.
it can calculate the depth of a 2d point calculated from a 3d one so that when a sprite is drawn at that depth it will overlap correctly with 3d objects (except the sprite will appear parallel to the screen instead of appearing like a vertical wall)
the dll also lets you do mesh picking
list of functions :
Ex3d_initDll Ex3d_updateViewport Ex3d_setAspectRatio Ex3d_setProjection Ex3d_setClippingPlanes Ex3d_get2dCoord Ex3d_get3dCoord Ex3d_setTriangle Ex3d_getScreenCoordTriangle Ex3d_getRayTriangleIntersection Ex3d_getIntersectionDist Ex3d_calculateMouseRay Ex3d_getRayOrig Ex3d_getRayDir Ex3d_getNormalizedVector Ex3d_getTransformedRay Ex3d_getX Ex3d_getY Ex3d_getZ Ex3d_get3dPointDistance Ex3d_addTranslation Ex3d_addScaling Ex3d_addRotation Ex3d_clearTransformation Ex3d_getDepth Ex3d_freeDll d3d_model_create2 d3d_model_primitive_begin2 d3d_model_vertex2 d3d_model_vertex_texture2 d3d_model_vertex_normal2 d3d_model_vertex_normal_texture2 d3d_model_vertex_color2 d3d_model_primitive_end2 d3d_model_destroy2 pickModelMouse pickModelRay (updated 22 / 11 / 09)
a good tool that would work well with this dll is blender2gml.
it allows you to make models in blender and export them
to gml code. and to ensure they are triangle meshes, you can first
export a .3ds model, import it and then export it using blender2gml
http://host-a.net/doug25/Ex3d.zip (gm6, gm7)
Edited by doug25, 22 November 2009 - 06:10 AM.