def __init__(self, name, value, description, world, frame=None): _VisualEditorBase.__init__(self, name, value, description, world) self.frame = se3.identity() if frame == None else frame self.pointposer = PointPoser() self.pointposer.set(se3.apply(self.frame, value)) self.pointposer.setAxes(self.frame[0]) self.addWidget(self.pointposer)
def __init__(self,name,value,description,world,frame=None): _VisualEditorBase.__init__(self,name,value,description,world) self.frame = se3.identity() if frame==None else frame self.pointposer = PointPoser() self.pointposer.set(se3.apply(self.frame,value)) self.pointposer.setAxes(self.frame[0]) self.addWidget(self.pointposer)
class _PointVisualEditor(_VisualEditorBase): def __init__(self,name,value,description,world,frame=None): _VisualEditorBase.__init__(self,name,value,description,world) self.frame = se3.identity() if frame==None else frame self.pointposer = PointPoser() self.pointposer.set(se3.apply(self.frame,value)) self.pointposer.setAxes(self.frame[0]) self.addWidget(self.pointposer) def instructions(self): return 'Right-click and drag on the widget to pose the point' def mousefunc(self,button,state,x,y): if _VisualEditorBase.mousefunc(self,button,state,x,y): self.value = se3.apply(se3.inv(self.frame),self.pointposer.get()) return True return False
class _PointVisualEditor(_VisualEditorBase): def __init__(self, name, value, description, world, frame=None): _VisualEditorBase.__init__(self, name, value, description, world) self.frame = se3.identity() if frame == None else frame self.pointposer = PointPoser() self.pointposer.set(se3.apply(self.frame, value)) self.pointposer.setAxes(self.frame[0]) self.addWidget(self.pointposer) def instructions(self): return 'Right-click and drag on the widget to pose the point' def mousefunc(self, button, state, x, y): if _VisualEditorBase.mousefunc(self, button, state, x, y): self.value = se3.apply(se3.inv(self.frame), self.pointposer.get()) return True return False