Exemplo n.º 1
0
 def __init__ (self, *args, **kwds) :
   wxGLWindow.__init__(self, *args, **kwds)
   self.Bind(wx.EVT_LEFT_DCLICK, self.OnDoubleClick)
   self.Bind(wx.EVT_ERASE_BACKGROUND, lambda evt: None)
   # FIXME orthographic is definitely best for this application, but it isn't
   # working properly right now
   #self.orthographic = True
   parent = self.GetParent()
   if (parent is None) :
     parent = kwds.get("parent")
   assert (parent is not None)
   self.settings = parent.settings
   self.buffer_factor = 2.0
   self.min_slab = 4
   self.min_viewport_use_fraction = 0.1
   self.min_dist = 4.0
   self.flag_show_fog = True
   self.flag_use_lights = True
   self.flag_use_quadrics = False
   self.minimum_covering_sphere = None
   self.spheres_display_list = None
   self.points_display_list = None
   self.labels_display_list = None
   self.miller_array = None
   self.d_min = None
   self.scene = None
   self.animation_time = 0
   #self.fps = gltbx.viewer_utils.fps_monitor()
   # XXX prevent exception when no data are loaded
   from scitbx.math import minimum_covering_sphere
   from scitbx.array_family import flex
   points = flex.vec3_double([(0.0,0.0,0.0),(1.0,1.0,1.0)])
   mcs = minimum_covering_sphere(points=points, epsilon=0.1)
   self.minimum_covering_sphere = mcs
Exemplo n.º 2
0
 def __init__(self, *args, **kwds):
     wxGLWindow.__init__(self, *args, **kwds)
     self.Bind(wx.EVT_LEFT_DCLICK, self.OnDoubleClick)
     self.Bind(wx.EVT_ERASE_BACKGROUND, lambda evt: None)
     # FIXME orthographic is definitely best for this application, but it isn't
     # working properly right now
     #self.orthographic = True
     parent = self.GetParent()
     if (parent is None):
         parent = kwds.get("parent")
     assert (parent is not None)
     self.settings = parent.settings
     self.buffer_factor = 2.0
     self.min_slab = 4
     self.min_viewport_use_fraction = 0.1
     self.min_dist = 4.0
     self.flag_show_fog = True
     self.flag_use_lights = True
     self.flag_use_quadrics = False
     self.minimum_covering_sphere = None
     self.spheres_display_list = None
     self.points_display_list = None
     self.labels_display_list = None
     self.miller_array = None
     self.d_min = None
     self.scene = None
     self.animation_time = 0
     #self.fps = gltbx.viewer_utils.fps_monitor()
     # XXX prevent exception when no data are loaded
     from scitbx.math import minimum_covering_sphere
     from scitbx.array_family import flex
     points = flex.vec3_double([(0.0, 0.0, 0.0), (1.0, 1.0, 1.0)])
     mcs = minimum_covering_sphere(points=points, epsilon=0.1)
     self.minimum_covering_sphere = mcs
Exemplo n.º 3
0
 def __init__ (self, *args, **kwds) :
   if self.initialize_map_viewer_super :
     wxGLWindow.__init__(self, *args, **kwds)
   # various data objects
   self.map_ids     = []
   self.map_objects = []
   self.map_scenes  = {}
   self.show_object = {}
   self.map_panel = None
   # user settings
   self.mesh_line_width = 0.25 # very buggy on OS X + NVidia (and ???)
   self.selected_map_id = None
   self.update_maps = False
   self.flag_show_maps = True
   self.flag_smooth_lines = True
   self.flag_use_materials = False
   self.flag_show_rotation_center = True
   self.minimum_covering_sphere = minimum_covering_sphere(
     flex.vec3_double([[0,0,0],[100,100,100],[100,0,0],[0,100,100]]))
Exemplo n.º 4
0
 def __init__(self, *args, **kwds):
     wxGLWindow.__init__(self, *args, **kwds)
     self.Bind(wx.EVT_LEFT_DCLICK, self.OnDoubleClick)
     self.Connect(-1, -1, UPDATE_MODEL_ID, self.OnUpdateModel)
     self.Connect(-1, -1, ADD_MODEL_ID, self.OnAddModel)
     self.model_panel = None
     self.minimum_covering_sphere = None
     self.show_object = {}
     self.pick_object = {}
     self.model_objects = []
     self.model_ids = []
     self.scene_objects = {}
     self.model_colors = {}
     self.model_reps = {}
     self.update_scene = False
     self.buffer_factor = 2  # see gltbx.wx_viewer
     self.min_slab = 4
     self.min_viewport_use_fraction = 0.1
     self.min_dist = 4.0
     self.sphere_scale_factor = 1.0
     self.update_settings(opengl_phil.extract())
     self.closest_point_i_seq = None
     self.closest_point_model_id = None
     # toggles for viewable objects
     self.flag_show_fog = True
     self.flag_show_lines = True
     self.flag_show_points = True
     self.flag_show_spheres = True
     self.flag_use_lights = True
     self.flag_show_labels = True
     self.flag_show_trace = False
     self.flag_show_ribbon = True
     self.flag_show_noncovalent_bonds = True
     self.flag_show_hydrogens = False
     self.flag_show_ellipsoids = True
     self.flag_smooth_lines = True
     self.flag_recenter_on_click = False
     self.flag_show_context_menu = True  #False
Exemplo n.º 5
0
 def __init__ (self, *args, **kwds) :
   wxGLWindow.__init__(self, *args, **kwds)
   self.Bind(wx.EVT_LEFT_DCLICK, self.OnDoubleClick)
   self.Connect(-1, -1, UPDATE_MODEL_ID, self.OnUpdateModel)
   self.Connect(-1, -1, ADD_MODEL_ID, self.OnAddModel)
   self.model_panel = None
   self.minimum_covering_sphere = None
   self.show_object = {}
   self.pick_object = {}
   self.model_objects = []
   self.model_ids = []
   self.scene_objects = {}
   self.model_colors = {}
   self.model_reps = {}
   self.update_scene = False
   self.buffer_factor = 2 # see gltbx.wx_viewer
   self.min_slab = 4
   self.min_viewport_use_fraction = 0.1
   self.min_dist = 4.0
   self.sphere_scale_factor = 1.0
   self.update_settings(opengl_phil.extract())
   self.closest_point_i_seq     = None
   self.closest_point_model_id  = None
   # toggles for viewable objects
   self.flag_show_fog                     = True
   self.flag_show_lines                   = True
   self.flag_show_points                  = True
   self.flag_show_spheres                 = True
   self.flag_use_lights                   = True
   self.flag_show_labels                  = True
   self.flag_show_trace                   = False
   self.flag_show_ribbon                  = True
   self.flag_show_noncovalent_bonds       = True
   self.flag_show_hydrogens               = False
   self.flag_show_ellipsoids              = True
   self.flag_smooth_lines                 = True
   self.flag_recenter_on_click            = False
   self.flag_show_context_menu            = True #False
Exemplo n.º 6
0
 def __init__(self, *args, **kwds):
     wxGLWindow.__init__(self, *args, **kwds)
     wxLeapMotionWindowMixin.__init__(self)
     self._leap_rotation = None
     self._leap_translation = None
     self._leap_scale = None
Exemplo n.º 7
0
 def __init__(self, *args, **kwds):
     wxGLWindow.__init__(self, *args, **kwds)
     wxLeapMotionWindowMixin.__init__(self)
     self._leap_rotation = None
     self._leap_translation = None
     self._leap_scale = None