• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Page Information

    Loading...
  1. Dashboard
  2. Undefined Space
  3. OpenJFX
  4. 3D Features

3D Features

  • Created by J. Duke, last modified on Oct 05, 2012

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 is now a Node
  • Camera can be added to a scene graph
  • Camera's position and aim (or orientation) is set using standard Node transform properties and methods
  • For backward compatibility, fixed camera need not be added to the scene
  • Added new properties for near & far clipping plane
  • SubScene is a special Node for scene separation
  • It can be used to render part of the Scene with different camera
  • Possible use cases are:
    • Picture in picture
    • Overlay or "heads-up" display for UI controls in a scene with a moving camera
Camera Class Hierarchy
  • javafx.scene.Node
    • javafx.scene.Camera
      • 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);

XXXXXXXXXXXXXx

Overview
Content Tools
ThemeBuilder
  • No labels

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.22
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 181, "requestCorrelationId": "529bae909c2b8d80"}