r/JavaFX • u/dunc-60 • Jun 20 '24
Help Javafx handling perspective
Have used javafx to develop an app for modeling real estate. Uses the Meshview class to create walls, windows, floors, roofs etc then assembled them into a structure somewhat like building with Lego. Difficult part is retaining correct perspective when the model is rotated on its x, y or z axis. Has anyone run into this issue on a similar app?
2
Upvotes
View all comments
Show parent comment
1
u/OddEstimate1627 Jun 22 '24 edited Jun 22 '24
You can make all of your meshes children of a Group and then rotate the Group. Then everything is moved together and you don't have to manually figure out the transform of each part.
You shouldn't need to do any manual sorting based on z-depth. That's what the depth buffer is for.