3D Features Planned for Version 8

Introduction

This page presents the list of 3D features schedule for JavaFX 8.0. This information was presented at this year JavaOne as part of the 3D Made Easy with JavaFX technical session.

Three umbrella JIRA issues were created to capture most of this work: Movable Camera , 3D Geometry, and 3D Attributes

Proposed Features

Movable cameras and SubScene

Camera Class Hierarchy
  • javafx.scene.Node
    • javafx.scene.Camera (abstract)
      • javafx.scene.ParallelCamera
      • javafx.scene.PerspectiveCamera
    • javafx.scene.SubScene
Code segment

Specifying a Fixed Camera (existing 2.2 API)

// Create a camera and add it to the Scene
Camera camera = new PerspectiveCamera();
scene.setCamera(camera);

Specifying a Movable Camera

// Create a camera and add it to the Scene
Camera camera = new PerspectiveCamera();
scene.setCamera(camera);

// Add camera to scene graph (so it can move)
Group cameraGroup = new Group();
cameraGroup.getChildren().add(camera);
root.getChildren().add(cameraGroup);

// Rotate the camera
camera.rotate(45);

// Move the cameraGroup (camera moves with it)
cameraGroup.setTranslateZ(-75);

3D primitives

User-defined shapes
Predefined shapes
Shape3D Class Hierarchy

javafx.scene.Node
    javafx.scene.shape3d.Shape3D (abstract)
        javafx.scene.shape3d.MeshView
        javafx.scene.shape3d.Box
        javafx.scene.shape3d.Cylinder
        javafx.scene.shape3d.Sphere

Mesh Class Hierarchy

java.lang.Object
    javafx.scene.shape3d.Mesh (abstract)
        javafx.scene.shape3d.TriangleMesh

XXXXXXXXXXXx