예제 #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()