Changeset 8854:504d01e4357d in orange
 Timestamp:
 08/30/11 19:34:06 (3 years ago)
 Branch:
 default
 Convert:
 d2fe2a5fec966814ea290133323f0f6635a24c16
 Location:
 orange/OrangeWidgets
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

orange/OrangeWidgets/Visualize Qt/OWScatterPlot3D.py
r8852 r8854 405 405 OWGUI.rubber(box) 406 406 407 box = OWGUI.widgetBox(self.settings_tab, 'Mouse', orientation = "horizontal") 408 OWGUI.hSlider(box, self, 'plot.mouse_sensitivity', label='Sensitivity', minValue=1, maxValue=10, 409 step=1, 410 callback=self.plot.update, 411 tooltip='Change mouse sensitivity') 412 407 413 self.gui = OWPlotGUI(self) 408 414 gui = self.gui 
orange/OrangeWidgets/plot/owopenglrenderer.py
r8847 r8854 28 28 29 29 vertex_shader_source = ''' 30 in vec3 position; // TODO: research qualifiers30 in vec3 position; 31 31 32 32 uniform mat4 projection; 
orange/OrangeWidgets/plot/owplot3d.py
r8847 r8854 982 982 # Animate zooming: translate first for a number of steps, 983 983 # then scale. Make sure it doesn't take too long. 984 print('animating')985 984 start = time.time() 986 985 for i in range(num_steps): … … 989 988 break 990 989 self.plot_translation = self.plot_translation + translation_step 991 self. update()990 self.repaint() 992 991 for i in range(num_steps): 993 992 if time.time()  start > 1.: … … 995 994 break 996 995 self.plot_scale = self.plot_scale + scale_step 997 self. update()996 self.repaint() 998 997 999 998 def zoom_out(self): … … 1134 1133 right_vec[0] *= dx / (self.width() * self.plot_scale[0] * self.panning_factor) 1135 1134 right_vec[2] *= dx / (self.width() * self.plot_scale[2] * self.panning_factor) 1136 up_scale = self.height()*self.plot_scale[1]*self.panning_factor 1137 self.plot_translation = right_vec + up_vec*(dy / up_scale) 1135 right_vec[0] *= (self.mouse_sensitivity / 5.) 1136 right_vec[2] *= (self.mouse_sensitivity / 5.) 1137 up_scale = self.height() * self.plot_scale[1] * self.panning_factor 1138 self.plot_translation = right_vec + up_vec * (dy / up_scale) * (self.mouse_sensitivity / 5.) 1138 1139 elif self.state == PlotState.SCALING: 1139 1140 dx = pos.x()  self.scaling_init_pos.x() 1140 1141 dy = pos.y()  self.scaling_init_pos.y() 1141 dx /= float(self._zoomed_size[0]) # TODO1142 dy /= float(self._zoomed_size[1])1143 1142 dx /= self.scale_factor * self.width() 1144 1143 dy /= self.scale_factor * self.height() 1145 self.additional_scale = [dx, dy, 0] 1144 dy /= float(self._zoomed_size[1]) 1145 right_vec = normalize(numpy.cross(self.camera, [0, 1, 0])) 1146 self.additional_scale = [dx * abs(right_vec[0]) / float(self._zoomed_size[0]), 1147 dy, 1148 dx * abs(right_vec[2]) / float(self._zoomed_size[2])] 1146 1149 elif self.state == PlotState.IDLE: 1147 1150 legend_pos = self._legend.pos()
Note: See TracChangeset
for help on using the changeset viewer.