コード例 #1
0
ファイル: view3d.py プロジェクト: burcin/volumina
 def mousePressEvent(self, e):
     if e.type() == QEvent.MouseButtonDblClick:
         logger.debug( "double clicked" )
         #self.picker.SetTolerance(0.05)
         picker = vtkCellPicker()
         picker.SetTolerance(0.05)
         res = picker.Pick(e.pos().x(), e.pos().y(), 0, self.renderer)
         if res > 0:
             c = picker.GetPickPosition()
             logger.debug( " picked at coordinate = {}".format( c ) )
             self.emit(SIGNAL("objectPicked"), c[0:3])
     else:
         QVTKWidget2.mousePressEvent(self, e)
コード例 #2
0
 def mousePressEvent(self, e):
     if e.type() == QEvent.MouseButtonDblClick:
         print "double clicked"
         #self.picker.SetTolerance(0.05)
         picker = vtkCellPicker()
         picker.SetTolerance(0.05)
         res = picker.Pick(e.pos().x(), e.pos().y(), 0, self.renderer)
         if res > 0:
             c = picker.GetPickPosition()
             print " picked at coordinate =", c
             self.emit(SIGNAL("objectPicked"), c[0:3])
     else:
         QVTKWidget2.mousePressEvent(self, e)
コード例 #3
0
ファイル: view3d.py プロジェクト: burcin/volumina
 def update(self):
     QVTKWidget2.update(self)
     
     #Refresh the content, works around a bug on OS X
     self.paintGL()
コード例 #4
0
ファイル: view3d.py プロジェクト: burcin/volumina
 def __init__(self, parent = None):
     QVTKWidget2.__init__(self, parent)
コード例 #5
0
 def __init__(self, parent=None):
     QVTKWidget2.__init__(self, parent)
コード例 #6
0
    def update(self):
        QVTKWidget2.update(self)

        #Refresh the content, works around a bug on OS X
        self.paintGL()