mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Improve camera controls, and fix FOV, which was off by a factor of 2.
This commit is contained in:
parent
0f65cf3cf1
commit
5a03928a4b
1 changed files with 1 additions and 28 deletions
|
@ -60,37 +60,10 @@ class PrinterApplication(QtApplication):
|
|||
self.getRenderer().setBackgroundColor(QColor(200, 200, 200))
|
||||
|
||||
camera = Camera('3d', root)
|
||||
camera.translate(Vector(0, 150, 150))
|
||||
proj = Matrix()
|
||||
proj.setPerspective(85, 640/480, 1, 500)
|
||||
camera.setProjectionMatrix(proj)
|
||||
camera.translate(Vector(-150, 150, 300))
|
||||
camera.setPerspective(True)
|
||||
camera.lookAt(Vector(0, 0, 0), Vector(0, 1, 0))
|
||||
|
||||
camera = Camera('left', root)
|
||||
camera.translate(Vector(-150, 50, 0))
|
||||
proj = Matrix()
|
||||
proj.setOrtho(-200, 200, -200, 200, 1, 500)
|
||||
camera.setProjectionMatrix(proj)
|
||||
camera.lookAt(Vector(0, 50, 0), Vector(0, 1, 0))
|
||||
camera.setLocked(True)
|
||||
|
||||
camera = Camera('top', root)
|
||||
camera.translate(Vector(0, 150, 0))
|
||||
proj = Matrix()
|
||||
proj.setOrtho(-200, 200, -200, 200, 1, 500)
|
||||
camera.setProjectionMatrix(proj)
|
||||
camera.lookAt(Vector(0, 0, 0), Vector(0, 0, -1))
|
||||
camera.setLocked(True)
|
||||
|
||||
camera = Camera('front', root)
|
||||
camera.translate(Vector(0, 50, 150))
|
||||
proj = Matrix()
|
||||
proj.setOrtho(-200, 200, -200, 200, 1, 500)
|
||||
camera.setProjectionMatrix(proj)
|
||||
camera.lookAt(Vector(0, 50, 0), Vector(0, 1, 0))
|
||||
camera.setLocked(True)
|
||||
|
||||
controller.getScene().setActiveCamera('3d')
|
||||
|
||||
self.setActiveMachine(self.getMachines()[0])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue