[API Review] FX 8 3D API

Chien Yang chien.yang at oracle.com
Fri Feb 1 11:46:21 PST 2013


Hi all,

   We would like to seek a formal approval for the proposed 3D API that 
were sent to this alias in October last year. We have been actively 
working on it since then and we are now ready to make it part of the 
JavaFX 8 API.

JIRA:
http://javafx-jira.kenai.com/browse/RT-17401 : 3D geometry support
http://javafx-jira.kenai.com/browse/RT-24008 : 3D attributes

The proposed API Class Hierarchy:
Please see the 3D Feature page and the JavaFX API doc for detail 
description:

https://wikis.oracle.com/display/OpenJDK/3D+Features
http://javafx-jira.kenai.com/secure/attachment/35194/API-Review-Final-docs.zip


Camera
-----------

javafx.scene.Node

     javafx.scene.Camera (abstract)
         javafx.scene.ParallelCamera
         javafx.scene.PerspectiveCamera


3D primitives
-------------------

Shape3D:
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:
java.lang.Object

     javafx.scene.shape3d.Mesh (abstract)
         javafx.scene.shape3d.TriangleMesh


3D attributes
--------------------

Light:
javafx.scene.Node

     javafx.scene.light.LightBase (abstract)
         javafx.scene.light.AmbientLight
         javafx.scene.light.PointLight


Material:
java.lang.Object

     javafx.scene.material.Material (abstract)
         javafx.scene.material.PhongMaterial


SubScene
---------------

javafx.scene.Node

     javafx.scene.SubScene


3D Picking
---------------

java.lang.Object

     javafx.scene.input.PickResult


Methods and Properties added to Node
---------------------------------------------------------

LOD helper property:

/**
  * A read only property that stores the computed area of this
  * {@code Node} projected onto the physical screen in pixel unit.
  */
public final double getAreaInScreen()
public final javafx.beans.property.ReadOnlyDoubleProperty 
areaInScreenProperty()


3D transform  methods:

public Point3D sceneToLocal(Point3D scenePoint)
public Point3D sceneToLocal(double sceneX, double sceneY, double sceneZ)
public Point3D localToScene(Point3D localPoint)
public Point3D localToScene(double x, double y, double z)
public Point3D parentToLocal(Point3D parentPoint)
public Point3D parentToLocal(double parentX, double parentY, double parentZ)
public Point3D localToParent(Point3D localPoint)
public Point3D localToParent(double x, double y, double z)


Thanks,
- Chien


More information about the openjfx-dev mailing list