1 from PyQt4
import QtCore
3 from ost
import gfx, gui
8 QtCore.QObject.__init__(self, parent)
9 QtCore.QObject.connect(spnav,QtCore.SIGNAL(
"deviceTransformed(int,int,int,int,int,int)"), self.
Changed)
10 QtCore.QObject.connect(spnav,QtCore.SIGNAL(
"deviceButtonPressed(int)"), self.
Toggle)
19 transf.ApplyXAxisTranslation(tx/self.
speed)
20 transf.ApplyYAxisTranslation(ty/self.
speed)
21 transf.ApplyZAxisTranslation(-tz/self.
speed)
23 transf.ApplyXAxisRotation(rx/self.
speed)
24 transf.ApplyYAxisRotation(ry/self.
speed)
25 transf.ApplyZAxisRotation(rz/self.
speed)
32 print "Translation Enabled:",self.
trans
35 print "Rotation Enabled:",self.
rot
39 print "Speed Increased:",self.
speed
42 print "Speed Reduced:",self.
speed
47 def _InitSpaceNav(app):
49 spnav = gui.SpnavInput.GetQThread()
51 parent = app.gl_win.qobject
53 except AttributeError: