JavaFX 3D : Is FXML support for TriangleMesh available or planned?
Tom Schindl
tom.schindl at bestsolution.at
Tue Apr 9 01:47:49 PDT 2013
Wouldn't it be possible for FXML (not talking about SceneBuilder) to
provide a custom TriangleMeshBuilder which looks like this:
TriangleMeshBuilder ... {
private float[] points;
public TriangleMeshBuilder points(Collection<Float> points) {
// ...
}
public TriangleMeshBuilder points(Float... points) {
// ...
}
...
public TriangleMesh build() {
TriangleMesh t = new TriangleMesh();
// applyto
t.setPoints(points);
return t;
}
}
This would at least fix the runtime stuff when loading FXMLs.
So all needed is that the 3d people provide the builder and FXML and
SceneBuilder will work fine.
Tom
On 09.04.13 09:55, August Lammersdorf, InteractiveMesh wrote:
> So, is it assumed that JavaFX 8 will not provide FXML support for
> TriangleMesh and in consequence JavaFX Scene Builder will not be able to
> render 3D scenes?
>
> I'm inquisitive because I intend to write an FXML-converter/exporter for
> 3D models and scenes.
>
> August
>
> Am Montag, den 08.04.2013, 13:32 +0200 schrieb Milan Kubec
> <milan.kubec at oracle.com>:
>> Hello,
>> this functionality is not yet implemented in FXML.
>>
>> Milan
>>
>>
>> Dne 8.4.2013 11:08, August Lammersdorf, InteractiveMesh napsal(a):
>>> FXMLLoader loads following MeshView element correctly with an 'empty'
>>> TriangleMesh.
>>>
>>> How do I add elements for the primitive arrays of points, texCoords,
>>> etc.?
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <?import javafx.scene.paint.*?>
>>> <?import javafx.scene.shape.*?>
>>>
>>> <MeshView>
>>> <material>
>>> <PhongMaterial>
>>> <diffuseColor>
>>> <Color red="1.0" green="0.0" blue="0.0"/>
>>> </diffuseColor>
>>> </PhongMaterial>
>>> </material>
>>> <mesh>
>>> <TriangleMesh>
>>> <!-- TODO float[] points -->
>>> <!-- TODO float[] texCoords -->
>>> <!-- TODO int[] faces -->
>>> <!-- TODO int[] faceSmoothingGroups -->
>>> </TriangleMesh>
>>> </mesh>
>>> </MeshView>
>>>
>>> Thanks, August
>
More information about the openjfx-dev
mailing list