Mixing 2D and 3D
Richard Bair
richard.bair at oracle.com
Thu Jul 25 10:37:41 PDT 2013
Hi August,
> "I think we already do multiple active cameras?"
>
> More precisely: simultaneous viewing from different points of view into a single 3D scene graph was meant, i.e. several cameras are attached to one scene graph.
> A SubScene has exactly one camera attached which renders the associated scene graph into the corresponding SubScene's rectangle. Implementing simultaneous viewing requires a cloned 3D scene graph for the second, third, and so on SubScene/Camera. Material, Mesh, and Image objects can be re-used because they are shareable. Animations of Nodes' Transforms seem to be shareable as well. But Transitions (Rotate, Scale, Translate) have to be cloned because they operate on a Node's methods directly. So, simultaneous viewing seems practicable.
Jasper or Kevin will have to comment, but I know this scenario was talked about extensively in the design for the renderToImage and cameras, and I thought this was possible today.
> "Key/ mouse / touch / etc should be there already?"
> Scene navigation and model interaction are often the first stumbling blocks for developers with less 3D experience. A ready to go rotate, zoom, and drag support including setting of arbitrary pivot points and adjustment of the camera's clipping planes would overcome one's inhibitions.
I see
> "Node's properties and methods"
>
> Before I agree with all of your appraisals I would like to gain more experiences with their 3D related implementations. For instance I wasn't successful so far assigning a cursor to a Shape3D or receiving response from any 'setOnMouseXXX' method.
Yes, please do try it out, it should be working and if not please do file a bug. We use a pick-ray for determining which nodes to pick, and then deliver mouse events to 3D and 2D nodes the same way.
Thanks!
Richard
More information about the openjfx-dev
mailing list