This content has been marked as final. Show 2 replies
As per this webpage "3D Features" https://wikis.oracle.com/display/OpenJDK/3D+Features|https://wikis.oracle.com/display/OpenJDK/3D+Features] :
- javafx.scene.shape.Mesh : Sharable among multiple user-defined shapes
- javafx.scene.paint.Material : Sharable among multiple Shape3D nodes
In your code you are re-using the mesh-instance (TriangleMesh) and the p-instance (PhongMaterial). These instances are not copied, they are referenced. Any change applied to 'mesh' and 'p' will affect ALL its users (MeshView).
Creating and re-using of two PhongMaterial objects, pAqua and pAntiquewhite, should lead to the desired visual effect.
Thanks for the clarification, interesting.....
I technically am setting all of the mesh's to be 1 "whole" so I do want everything to be exactly the same, I was just curious why this was happening :).
Thanks again Mesh Master :p.