Jay,
The FXShapeController is used by the FXGeometryCanvas. The code itself is quite large, but here's a small code snippet of using it to add a rectangular prism.
//Get the shape provider from the FXShapeControllerProviderFactory
IControllerProvider<FXShapeController> provider = factory.createProvider(new ShapeMesh());
//Create a root shape
ShapeMesh rootMesh = new ShapeMesh();
FXShapeController root = provider.createController(rootMesh);
root.setRoot(true);
//Create a shape to display in the scene
ShapeMesh rectMesh = new ShapeMesh();
FXShapeController rect = provider.createController(rectMesh);
//Add the shape as a child of the root
root.addEntity(rect);
//Make the shape into a rectangular prism with the dimensions 50 x 50 x 200
rect.setProperty(MeshProperty.TYPE, ShapeType.Cube.toString()).
rect.setScale(50, 50, 200);
Robert
From: ice-dev-bounces@xxxxxxxxxxx <ice-dev-bounces@xxxxxxxxxxx> on behalf of Jay Jay Billings <jayjaybillings@xxxxxxxxx>
Sent: Friday, February 26, 2016 10:26 AM
To: ice developer discussions
Subject: Re: [ice-dev] Standalone JavaFX example in EAVP?
Thanks Robert,
Do you have an small example of a Controller lying around or could you create one if you have a few spare minutes?
Jay
|