def load(self, context, cf_obj, factor): self.cf_obj = cf_obj self.candidateModel.setData(cf_obj.factor_to_cost[factor], cf_obj) self.factorCandidateTable.selectRow(0) if context == None: context = Context.empty_context() self.contextWindow.setContext(context)
def __init__(self, parent=None): self.parent = parent QtOpenGL.QGLWidget.__init__(self, parent) self.setMouseTracking(True) self.yRotDeg = 0.0 self.camera_xyz = na.array([10, 10, 10]) self.camera_rpy = na.array([0, 0, 0]) self._selected_groundings = [] self._highlighted_groundings = {} self.groundingFilter = lambda x: True self.placeOnObjectFilter = lambda x: True self.clearModes() self.placeHeight = 0.1 self.setContext(Context.empty_context(), updateGL=False)