JDK-8100766 : 3D geometry support
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: fx2.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2011-10-13
  • Updated: 2015-06-16
  • Resolved: 2013-04-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Description
This is the umbrella JIRA for 3D geometry support.  

Sub-JIRAs to be filed include triangle mesh, 3D primitives, etc. 3D attributes will be covered by a separate umbrella JIRA RT-24008
Comments
Will there be any support for 3D lines? For example, Polyline3D, LineTo3D, etc.? It doesn't appear that it's possible to draw lines in 3D space at the moment...
09-08-2013

All planned 3D geometry support is now implemented on both d3d and es2 pipes.
16-04-2013

@Alexander: To answer your 4 API questions: 1) CW and CCW describe the winding order not which face is front or back. For example, a triangle strip will have CW and CCW, there is no way to determine which is front or back using the winding order 2) We intentionally made division is a constructor argument. We don't want to re-tessellate the mesh once it is constructed. 3) It represents how fine you want to tessellate the predefined shape; bigger is finer. 4) This is out of the scope of FX 8.
07-02-2013

Comments: 1. CullFace.BACK and CullFace.FRONT names don't seem to be meaningful. Why can't they be renamed to CW and CCW or similar? 2. Why there is no Cylinder.setDivisions or Cylinder.divisionsProperty()? The same for Sphere? 3. "The resolution is defined in terms of number of subdivisions along the sphere's axes." <- this is not clear to me. What are the sphere's axes? Wouldn't it be better to set the maximum length between to vertices? The same for Cylinder. 4. TriangleMesh is not using observable FloatArrayList or IntegerArrayList I prepared to provide consistent and efficient API. Small comments: 1. public Box() is missing description which seems to be assigned to public static final double DEFAULT_SIZE 2. javafx.beans.property.DoubleProperty radius Defines the radius in the Z plane of the Cylinder. <- There is no Z plane, There are XZ or YZ planes. 3. "XXX Info about null Material XXX" in Shape3D javadoc 4. LightBase class description doesn't seem to be complete as it states a list of properties but describes only one. 5. The following doesn't seem to be correct in both Parallel and Perspective Cameras: " This camera is always located at center of the window and looks along the positive z-axis." 6. PerspectiveCamera() constructor description is missing. 7. public final boolean isFixedEyePosition() description is missing. 8. Incorrect text in many places of PhongMaterial JavaDoc: "{@code PhongMaterial)". 9. diffuseColorProperty, specularColorProperty, specularPowerProperty and other PhongMaterial properties need detailed description. 10. Default values are not specified for PhongMaterial constructor with no arguments. 11. MID_RESOLUTION is not defined for Sphere 12. Default values for depthBuffer and antiAliasing in SubScene constructor are not listed. 13. SubScene lists cameraProperty with the following remark: "Note: this is a conditional feature. See ConditionalFeature.SCENE3D for more information." To me it makes more sense to mark PerspectiveCamera with such a note rather than camera property in SubScene. 14. Should there be a way to know the answer to "Both a null value meaning paint no background and a Paint with transparency are supported, but what is painted behind it will depend on the platform."? ConditionalFeature or some API for that? 15. "TODO: 3D - if faceSmoothingGroups is null (default) --> smooth faces Note: faceSmoothingGroups.length must be equal to faces.length/NUM_COMPONENTS_PER_FACE. Error: Throw exception?", "TODO: 3D - doc. follows array semantic" in TriangleMesh javadoc 16. TriangleMesh methods do not indicate whether they are copying arrays on each invocation. 17. NUM_COMPONENTS_PER_FACE, NUM_COMPONENTS_PER_POINT, NUM_COMPONENTS_PER_TEXCOORD have no description in javadoc. Maybe they should be hidden? 18. TriangleMesh.set/get Points/TexCoords/Faces javadocs don't clearly state whether length is in single floats or in triples/pairs of floats/integers. 19. There is no description of smoothingGroups in TriangleMesh.
07-02-2013

Updated API docs based on the review discussion: Kevin, Richard and I have an offline discussion on the grouping of new 3D classes. After talking through the pros and cons of possible grouping approaches. We agreed to collapse the packages as follows: move all (9) classes from javafx.scene.shape3d ==> javafx.scene.shape move all (2) classes from javafx.scene.material ==> javafx.scene.paint move all (3) classes from javafx.scene.light ==> javafx.scene and also change LOD helper, Node.areaInScene, a read only property to a compute method.
07-02-2013

Attached the final 3D API doc for public review. 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)
01-02-2013

How about enabling WebGL inside WebView? This would allow to reuse excellent libraries such as tree.js (http://mrdoob.github.com/three.js/).
09-11-2012

Docs/OK
15-10-2012

Here is the extra wiki page that contains the set of features: https://wikis.oracle.com/display/OpenJDK/3D+Features
12-10-2012

Docs/OK
12-10-2012

Up priority to major to reflect its current status in development effort.
10-10-2012

Fix error on the due date, should be Jan 23 as stated in comment.
02-10-2012

G11N/OK - most likely no translation required.
20-09-2012

SQE/OK with date for a date to baseline EFP. We will revisit this after 9/24
17-09-2012

Change to 9/24 for the date for the date becuase of J1 impact.
12-09-2012

It's an internal link. As soon as we are ready, we will post something on an external Wiki (probably in a couple of weeks).
07-09-2012

Chien, the link seems broken.
07-09-2012

Here is the wiki link to our 3D planning: http://wiki.se.oracle.com/display/JPGC/3D+Features
31-08-2012

Once you have the plan please also provide us the date when you will have omething for SQE to start testing. We will also need some kind of engineering spec and javadoc for this feature
31-08-2012

The Due date of 9/19 is the date engineering will come back with FC due date
16-08-2012

Set priority to match that of the PRD
06-08-2012

Implements A360 Feature http://oracleplan.oracle.com/gotoEntity?entityType=FEATURE&entityId=708306
06-08-2012