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

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

Page History

Versions Compared

Old Version 17

changes.mady.by.user J. Duke

Saved on Oct 05, 2012

compared with

New Version 18

changes.mady.by.user J. Duke

Saved on Oct 05, 2012

  • Previous Change: Difference between versions 16 and 17
  • Next Change: Difference between versions 18 and 19
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Defining Lights

Code Block
 // Create point light and add it to the Scene
 PointLight light = new PointLight();
 light.setColor(Color.RED);
 scene.getLights().add(light);

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

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

 // Move the lightGroup (light moves with it)
 lightGroup.setTranslateZ(-75);

Defining Materials

Code Block
 // Create material
 Material mat = new PhongMaterial();
 Image diffuseMap = new Image("diffuseMap.png");
 Image bumpMap = new Image("normalMap.png");

 // Set material properties
 mat.setDiffuseMap(diffuseMap);
 mat.setBumpMap(normalMap);
 mat.setSpecularColor(Color.WHITE);

 // Use the material for a shape
 shape3d.setMaterial(mat);

...

3D picking

  • 3D ray picking already used for 2D primitives with PerspectiveCamera
  • Existing limitation when used with depth buffer will be fixed (JIRA: RT-13740)
  • We will add support for picking 3D geometry

Loader support

  • Many 3D file formats exist, such as:
    •  Obj, Maya, 3D Studio Max, Collada, KRML
  • We will not provide a loader as part of the JavaFX runtime
  • We will make sample code available for one or two popular formats
Overview
Content Tools
ThemeBuilder

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.23
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 517, "requestCorrelationId": "37d870bfa90d97d9"}