Rotating any shape on any 3D axis results in a truncated scene view. Below is a simple example that illustrates this bug. We should see a 4 sided polygon, but we only see a triangle instead.
import javafx.application.Application;
import javafx.geometry.Point3D;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.shape.Polygon;
import javafx.scene.transform.Rotate;
import javafx.scene.transform.Translate;
import javafx.stage.Stage;
public class RotationBug extends Application {
@Override
public void start(Stage stage) throws Exception {
Group g = new Group();
Scene scene = new Scene(g, 400, 400);
Polygon p = new Polygon(new double[] { 0, 0, 0, 100, 100, 100, 100, 0, 0, 0 });
p.setStrokeWidth(5);
p.getTransforms().add(new Translate(200, 200));
p.getTransforms().add(new Rotate(45, 0, 0, 0, new Point3D(1, 1, 0)));
g.getChildren().add(p);
stage.setScene(scene);
stage.setVisible(true);
}
public static void main(String[] args) {
Application.launch(RotationBug.class, args);
}
}