Changeset 8418:51b5fb18cdca in orange
 Timestamp:
 07/22/11 21:09:01 (3 years ago)
 Branch:
 default
 Convert:
 5b5d82b30e09f956462ad478f25d00a018f0a878
 Location:
 orange/OrangeWidgets
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

orange/OrangeWidgets/Prototypes/OWScatterPlot3D.py
r8417 r8418 215 215 if self.plot.selection_type == SelectionType.ZOOM: 216 216 indices = self.plot.get_selection_indices() 217 print(len(indices))218 217 if len(indices) == 0: 219 218 return 220 selected = [1 if i in indices else 0 for i in range(len(self.data))]221 #selected = self.data.selectref(selected)222 219 X, Y, Z = self.data_array[:, self.x_attr],\ 223 220 self.data_array[:, self.y_attr],\ 224 221 self.data_array[:, self.z_attr] 225 print(type(X)) 226 print(X.selectref(selected)) 222 X = [X[i] for i in indices] 223 Y = [Y[i] for i in indices] 224 Z = [Z[i] for i in indices] 227 225 min_x, max_x = numpy.min(X), numpy.max(X) 228 226 min_y, max_y = numpy.min(Y), numpy.max(Y) 
orange/OrangeWidgets/owplot3d.py
r8417 r8418 529 529 glBindVertexArray(vao_id) 530 530 glDrawArrays(GL_TRIANGLES, 0, vao_id.num_vertices) 531 532 self.tooltip_fbo.bind()533 glClearColor(1, 1, 1, 1)534 glClear(GL_COLOR_BUFFER_BIT)535 glDisable(GL_BLEND)536 self.symbol_shader.setUniformValue(self.symbol_shader_tooltip_mode, True)537 glDrawArrays(GL_TRIANGLES, 0, vao_id.num_vertices)538 self.tooltip_fbo.release()539 540 531 glBindVertexArray(0) 541 532 else: … … 543 534 glDrawElements(GL_LINES, outline_vao_id.num_indices, GL_UNSIGNED_INT, c_void_p(0)) 544 535 glBindVertexArray(0) 536 537 # Draw colorpicking buffer. 538 glBindVertexArray(vao_id) 539 self.tooltip_fbo.bind() 540 glClearColor(1, 1, 1, 1) 541 glClear(GL_COLOR_BUFFER_BIT) 542 glDisable(GL_BLEND) 543 self.symbol_shader.setUniformValue(self.symbol_shader_tooltip_mode, True) 544 glDrawArrays(GL_TRIANGLES, 0, vao_id.num_vertices) 545 self.tooltip_fbo.release() 546 glBindVertexArray(0) 547 545 548 self.symbol_shader.release() 546 549 547 550 if labels != None: 548 551 for x, y, z, label in zip(X, Y, Z, labels): 549 x = self.initial_center[0] 550 y = self.initial_center[1] 551 z = self.initial_center[2] 552 x *= self.initial_scale[0] * scale[0] 553 y *= self.initial_scale[1] * scale[1] 554 z *= self.initial_scale[2] * scale[2] 552 x, y, z = self.transform_data_to_plot((x, y, z)) 555 553 self.renderText(x,y,z, ('%f' % label).rstrip('0').rstrip('.'), font=self.labels_font) 556 554 … … 947 945 948 946 def set_new_zoom(self, x_min, x_max, y_min, y_max, z_min, z_max): 949 print((x_min, x_max)) 947 return 948 # TODO 950 949 self.initial_center = [(x_max + x_min) / 2., 951 950 (y_max + y_min) / 2., … … 1067 1066 GL_UNSIGNED_BYTE) 1068 1067 self.tooltip_fbo.release() 1069 value = struct.unpack('i', value)[0] 1070 if value != 1: 1068 value = struct.unpack('I', value)[0] 1069 # Check if value is less than 4294967295 ( 1070 # the highest 32bit unsigned integer) which 1071 # corresponds to white background in colorpicking buffer. 1072 if value < 4294967295: 1071 1073 self.mouseover_callback(value) 1072 1074
Note: See TracChangeset
for help on using the changeset viewer.