Camera.getPickRay() doesn't return results consistent with a new com.ardor3d.framework.Canvas after resizing the window, unless I manually resize the Camera on each componentResized event. Is this correct, or is there a better way. You can see this issue resizing the window in the ShapesExample.
How can I adjust the Camera so that aspect ratio of the scene is not altered when the user resizes the window. Unless a translations is applied to the model, the center of the window should remain aligned the the center of the world coordinate system. I tried playing with camera.resize() but I don't get the results I expect and pickRay problem above manifests itself. Does the viewport or frustum have to be adjusted?
To translate the model against mouse motion, I scale screen pixel changes to world coordinate changes at the world coordinate origin. But to do this using Camera facilities I need the normalized depth at the w.c. origin so I can use
Camera.getWorldCoordinates. My solution is to build a function zDepth -> w.c. Z at the center of the window and
interpolate. This works well, but would have to be updated anytime the camera is changed. Can you suggest a better way
using what Jogamp Ardor3D already has? Any suggestion greatly appreciated. I know I could work the model to view
tranfpormation process backward, but there must be a better way.
I think that there is some source code commented somewhere doing what you seem to expect. In theory, you can use several cameras with a single canvas and you can use the same camera with several canvases, that's why a camera isn't strictly bound to a canvas and it's up to you to update the camera used with a particular canvas.
I think that there is some source code commented somewhere doing what you seem to expect.
I'll dig around, but definitely the examples dealing with PickRay do not handle window resizing properly.
In theory, you can use several cameras with a single canvas and you can use the same camera with several canvases, that's why a camera isn't strictly bound to a canvas and it's up to you to update the camera used with a particular canvas.
Okay, that makes sense but more flexibility demands more intimate knowledge of internal mechanisms and w/o documentation I'm forced to examine the code and post questions to a list of experts who hopefully have already tackled the problem. I really appreciate the insight you've provide thus far, how would you approach this? Could you point me to source code from one of your projects?