Question

I'm currently experimenting with the new JavaFX-3D Objects. With the Molecule example as starting point, i tried to build a Scene with an embedded SubScene. In the main scene, there should be the molecule like in the example from oracle and in the subscene one should just see e.g. just the projection from the left of the molecule.

Is it possible to add a second camera to the scene, and set it for the subscene, or does every subscene need the same 3D Object in it?

I'm new to this topic, and i would be happy to read some tips/tricks/infos. Thanks in advance!

Was it helpful?

Solution

Only one Camera can be set for a Scene or SubScene. Simultaneous viewing requires several SubScenes with an individual Camera and redundant scene graphs. Instances of shareable classes like PhongMaterial and TriangleMesh can be re-used in every scene graph.

Alternatively, the Node.snapshot() feature can be used. But lighting doesn't seem to work properly yet. See proof of concept here http://www.interactivemesh.org/models/jfx3dtuxcube.html.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top