Beispiel #1
0
def main():
    settings.init()
    glutInit()
    ASWindow.setupWindow()
    glutMouseFunc(on_click)
    glutMotionFunc(on_drag)
    glutKeyboardFunc(on_keyboard)
    glutDisplayFunc(draw)
    # glutIdleFunc(draw)
    app = QApplication(sys.argv)
    ex = ASUI.sliderdemo()
    ex.show()
    glutMainLoop()
Beispiel #2
0
 def cameraXValueChange(self):
     degree = 1 if self.previousX < self.cameraSliderX.value() else -1
     self.previousX = self.cameraSliderX.value()
     ASWindow.changeCameraAngle(degree, [1, 0, 0])
     main.draw()
Beispiel #3
0
 def cameraYValueChange(self):
     degree = 1 if self.previousY < self.cameraSliderY.value() else -1
     self.previousY = self.cameraSliderY.value()
     ASWindow.changeCameraAngle(degree, [0, 1, 0])
     main.draw()
Beispiel #4
0
 def resetView(self):
     ASWindow.refresh2d(settings.width, settings.height)
     main.draw()