Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8093983

3D Rotation results in truncated view with default parallel camera

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P5 P5
    • 8
    • fx2.0
    • javafx
    • Windows 7

      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);
         }
      }

        1. no_rotate.png
          no_rotate.png
          15 kB
        2. bug.png
          bug.png
          15 kB

            ckyang Chien Yang (Inactive)
            duke J. Duke
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: