system - Coordinate transformations in javafx -
I have to put right-handed cartesian coordinate system in JavaFX, so at the bottom left corner of the window (0,0), X Moving on the right and y is moving towards the top. I can not understand how to do with the conversion. If I apply a Rotation Transform, then the button will be reversed. I want to be able to use this coordinate system instead of default.
As (see Chapter Y-Down vs. Wi-up ), Yew Down is used by many 2D graphics libraries, where Java FX has started.
To apply and correct the Y, you can put all of your content into rotated parent nodes:
// to use Y Rotate the camera camera.setRotationAxis (Rotate.Z_AXIS); Camera.setRotate (180.0); // Rotate the visible content for the right drawing group yUp = new group (); YUp.setRotationAxis (Rotate.Z_AXIS); YUp.setRotate (180.0); Visual View = New View (yUp); Scene.setCamera (camera);
Now to add all those nodes to the Wi-Fi environment, add yUp
Keep in mind that it is OK in 2D space. is. If you come with additional 3D features, make sure your models grow in the negative Y direction. Otherwise you will have to use any other container.
Comments
Post a Comment