Beispiel #1
0
 def pick_mouse_position(self):
     """Get corresponding mouse location in the 3D plot."""
     if self.mouse_position is None:
         self.store_mouse_position()
     picker = _vtk.vtkWorldPointPicker()
     picker.Pick(self.mouse_position[0], self.mouse_position[1], 0, self.renderer)
     return picker.GetPickPosition()
Beispiel #2
0
    def pick_click_position(self):
        """Get corresponding click location in the 3D plot.

        Returns
        -------
        tuple
            Three item tuple with the 3D picked position.

        """
        if self.click_position is None:
            self.store_click_position()
        picker = _vtk.vtkWorldPointPicker()
        picker.Pick(self.click_position[0], self.click_position[1], 0, self.renderer)
        return picker.GetPickPosition()