3D programming is a huge topic that is way beyond the scope of this book. Also the capabilities of JavaFX 3D are limited, so I'll only introduce you to several basic elements and concepts to create some cool examples.
Introduction to the JavaFX 3D API
Basic 3D elements
JavaFX works with 3D elements using the same Scene concept, but adds a third dimension in the form of a Z-coordinate. JavaFX provides a few basic 3D shapes (javafx.scene.shape.Shape3D) to start with:
- Box
- Cylinder
- Sphere
For more complex figures, there is a class, MeshView, that can be used to hold a polygon mesh.
A polygon mesh is a collection of vertices, edges, and faces that defines the shape of a polyhedral object in 3D computer graphics and solid...