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()
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()
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()
def resetView(self): ASWindow.refresh2d(settings.width, settings.height) main.draw()