a quasi-raskinesque zoomable, mostly text interface + 3d, cross platform and open; where do i start? (opengl?)
in this browser and bitmap graphics dominated world - after decades of macintosh-ish richly decorated windows and pretty components - I'm looking for a way to render fixed size character text, draw an extremely simplified "gui" onto 3d panels that can be zoomed and interactively resized making the content tiny and not wrapped or not more readable, onto "panels" that the user could tile together, "stack" up, turn around, drag etc.
the software should be portable or cross platform.
it seems that a simple, basic 3d layer is a good thing to employ, e.g. opengl, the problem is: i don't know anything about these things.
what's the most easy route to get the thing done without having to开发者_如何学运维 learn everything of a 3d toolkit?
what could be the most fitting tool to achieve this?
java3d? or is it outdated/slow? qt toolkit 3d widgets?
thank you in advance for any hint
OpenGL does have support for rendering text, specifically: `
glRaster3f(GLfloat x, GLfloat y, GLfloat z);
would set the "raster" position, and
glutBitmapCharacter(GLUT_BITMAP_9_BY_15, 'h');
would render an h at that "raster" position. However, that would require learning the OpenGL API.
The other option is to do all of the math for projection yourself and just rendering it onto a character array that is the size of your window.
Here are the matrices that OpenGL uses for its 3D projections and transformations.
That would have generally the same effect, and you wouldn't need all of the extra libraries. However, that would actually make your core program bigger, and it might be slightly slower because it isn't hardware accelerated like OpenGL is.
Java3D on the other hand, actually runs on top of either OpenGL or Direct3D which means that the libraries required to run it would be even more extensive. However, while an API nonetheless, it does seem to be a much simpler API than either OpenGL or Direct3D.
The interactivity is a different problem all-together.
Once again, OpenGL does have the necessary support.
gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
would convert the window coordinates returned by a mouse click into the 3-space coordinates of the front most texel given the proper projection and modelview matrices.
I don't really know about java3D in this case, or even what you would use if you calculated your own 3D effect.
Overall, you do have a lot to chose from, but all require a good deal of work and consideration.
精彩评论