Beispiel #1
0
 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)
Beispiel #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)
Beispiel #3
0
 def update(self):
     QVTKWidget2.update(self)
     
     #Refresh the content, works around a bug on OS X
     self.paintGL()
Beispiel #4
0
 def __init__(self, parent = None):
     QVTKWidget2.__init__(self, parent)
Beispiel #5
0
 def __init__(self, parent=None):
     QVTKWidget2.__init__(self, parent)
Beispiel #6
0
    def update(self):
        QVTKWidget2.update(self)

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