Disclaimer: I am pretty new to Java, jMonkeyEngine, and game concepts in general. Some things I say may be extremely naive or ignorant.
I’m not even sure if this is an appropriate group to post this in, but here goes: I’m currently getting my toes wet with jMonkeyEngine by attempting to build a simple model viewer that loads a model, draws the (labelled) x/y/z axes, and allows the user to rotate/orbit around the loaded model. I’ve already mostly accomplished this, but am running into things that are mucking with my “vision” of how the app ought to behave.
Namely, the axis lines are not quite what I imagined. I had hoped to always have them on the screen, drawn out to the absolute edges of the window in all cases. However, the camera seems to have two limitations: a maximum viewing distance, after which it clips the rest of the line regardless of the line’s CullHint or length, and another tendency to clip the line after it intersects the camera plane. I suppose the latter ought to have been predictable if I had a greater understanding of OpenGL camera mechanics, but alas I do not. I was wondering if there were camera settings I could tweak to get the effect I am after? I hope I’m doing an adequate job of explaining my intentions.
If there is no way to get this effect by tweaking the camera, I had thought about using orthographic projection to just draw the axis lines directly on the guiNode, but I’m not even sure where to start on this. How do I figure out where to draw the lines on the “lens” looking into the 3d space?
My current source is available here: https://bitbucket.org/rherriman/jmodelview/src/1a0f0f7d00f7/src/jmodelview/ModelView.java
Any assistance you can offer is appreciated!