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.xformposer = TransformPoser()
     self.xformposer.set(*se3.mul(self.frame, value))
     self.xformposer.enableRotation(True)
     self.xformposer.enableTranslation(True)
     self.addWidget(self.xformposer)
 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.xformposer = TransformPoser()
     self.xformposer.set(*se3.mul(self.frame,value))
     self.xformposer.enableRotation(True)
     self.xformposer.enableTranslation(True)
     self.addWidget(self.xformposer)
class _RigidTransformVisualEditor(_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.xformposer = TransformPoser()
        self.xformposer.set(*se3.mul(self.frame, value))
        self.xformposer.enableRotation(True)
        self.xformposer.enableTranslation(True)
        self.addWidget(self.xformposer)

    def instructions(self):
        return 'Right-click and drag on the widget to pose the transform'

    def mousefunc(self, button, state, x, y):
        if _VisualEditorBase.mousefunc(self, button, state, x, y):
            self.value = se3.mul(se3.inv(self.frame), self.xformposer.get())
class _RigidTransformVisualEditor(_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.xformposer = TransformPoser()
        self.xformposer.set(*se3.mul(self.frame,value))
        self.xformposer.enableRotation(True)
        self.xformposer.enableTranslation(True)
        self.addWidget(self.xformposer)
    
    def instructions(self):
        return 'Right-click and drag on the widget to pose the transform'

    def mousefunc(self,button,state,x,y):
        if _VisualEditorBase.mousefunc(self,button,state,x,y):
            self.value = se3.mul(se3.inv(self.frame),self.xformposer.get())