Picking and/or coordinate axes
actually, I'm developing an application with Java3D imitating 3D-Modelling-Programs like Surpac, Gocad, Blender, ...
I have two different questions:
1) I want to a "coordinate cross" in the bottom left corner of the screen which indicates how I'm orientated in the 3D-space, please have a look at the attached picture.
This object shouldn't be zoomed or translated, only rotated. How can I implement this?
2) I have several spheres representing sample points. I want to edit the z-value of these points with the mouse. The picking, dragging and translating itself is already implemented and works fine, but I add or subtract the following value:
dist = Math.sqrt(Math.pow(cur_pos_new.x - cur_pos.x, 2) + Math.pow(cur_pos_new.y - cur_pos.y, 2));
cur_pos is the screen position (in pixels) where mouse_down is caused, cur_pos_new where mouse_released is caused, so dist is the distance between the two mouse positions.
I would like to have the following: I pick a sphere and drag the mouse. The new z-value should be the projection of the mouse coordinates into 3D, so that the z-value of the picked sphere is always at the same position as the mouse. With other words, the sphere follows the mouse respectively is at the same position with respect to the x-y-coordinates of the sphere.
Is this possible?
Kind regards and thanks in advance