Beispiel #1
0
    def mouseReleaseEvent(self, event):
        if self.events_mode == "inspect":
            if self.current_hit != None:
                self.updateGL(
                )  # there needs to be a clear or something  in order for the picking to work. This is  bit of hack but our rendering function doesn't take long anyhow
                hit = self.get_hit(event)
                if hit == self.current_hit:
                    self.point_selected.emit(self.current_hit, event)
            else:
                #EM3DSymModel.mouseReleaseEvent(self,event)
                EM3DModel.mouseReleaseEvent(
                    self, event
                )  #behavior in EM3DSymModel is not what we want (needed in sibling classes?)

            self.current_hit = None
        else:
            #EM3DSymModel.mouseReleaseEvent(self,event)
            EM3DModel.mouseReleaseEvent(
                self, event
            )  #behavior in EM3DSymModel is not what we want (needed in sibling classes?)
Beispiel #2
0
    def __init__(self, gl_widget):
        EM3DModel.__init__(self, gl_widget)

        self.init()
        self.initialized = True

        self.cam = Camera2(self)

        self.brightness = 0
        self.contrast = 10
        self.glcontrast = 1.0
        self.glbrightness = 0.0
        self.rank = 1
        self.inspector = None
        self.colors = get_default_gl_colors()
        self.currentcolor = "bluewhite"

        self.vdtools = EMViewportDepthTools2(self.get_gl_widget())

        self.get_gl_widget().cam.default_z = -1.25 * 50  # this is me hacking
        self.get_gl_widget().cam.cam_z = -1.25 * 50  # this is me hacking

        self.dl = None  # display list id