コード例 #1
0
ファイル: emrotor.py プロジェクト: CVL-dev/StructuralBiology
	def __init__(self,em_rotor_module,enable_timer=True):
		assert(isinstance(em_rotor_module,EMRotorModule))
		EMRotorWidget.allim[self]=0
		
		fmt=QtOpenGL.QGLFormat()
		fmt.setDoubleBuffer(True);
		fmt.setSampleBuffers(True)
		QtOpenGL.QGLWidget.__init__(self,fmt)
		EMEventRerouter.__init__(self)
		self.setMouseTracking(True)
		self.target = em_rotor_module
		
		self.setFocusPolicy(Qt.StrongFocus)
		
		self.fov = 30
		self.aspect = 1.0
		self.z_near = 1000
		self.z_far = 2000
		
		self.animatables = []
		
		
		self.light_0_pos = [0.1,.1,1.,0.]
		
		self.polygon_smooth = True	
コード例 #2
0
	def __init__(self, em_mx_rotor_module):
		
		assert(isinstance(em_mx_rotor_module,EMImageMXRotorModule))
		self.mmode = "drag"

		fmt=QtOpenGL.QGLFormat()
		fmt.setDoubleBuffer(True);
		fmt.setSampleBuffers(True)
		#fmt.setDepthBuffer(True)
		QtOpenGL.QGLWidget.__init__(self,fmt)
		EMEventRerouter.__init__(self,em_mx_rotor_module)
		EMGLProjectionViewMatrices.__init__(self)
		EMImageMXRotorWidget.allim[self]=0
		
		self.setFocusPolicy(Qt.StrongFocus)
		
		self.imagefilename = None
		
		self.fov = 30
		self.aspect = 1.0
		self.z_near = 6000
		self.z_far = 13000

		self.light_0_pos = [0.1,.1,1.,0.]
		
		self.resize(480,480)
コード例 #3
0
	def __init__(self, em_rotor_module):
		assert(isinstance(em_rotor_module,EMImageRotorModule))
		EMImageRotorWidget.allim[self]=0

		self.mmode = "drag"

		fmt=QtOpenGL.QGLFormat()
		fmt.setDoubleBuffer(True);
		fmt.setSampleBuffers(True)
		#fmt.setDepthBuffer(True)
		QtOpenGL.QGLWidget.__init__(self,fmt)
		EMEventRerouter.__init__(self)
		EMGLProjectionViewMatrices.__init__(self)
		
		self.target = em_rotor_module
		self.imagefilename = None
		
		self.fov = 20
		self.aspect = 1.0
		self.z_near = 1
		self.z_far = 2000