Ejemplo n.º 1
0
def resetCameraToRobot(view):
    t = robotModel.getLinkFrame('pelvis')
    if t is None:
        t = vtk.vtkTransform()

    focalPoint = [0.0, 0.0, 0.25]
    position = [-4.0, -2.0, 2.25]
    t.TransformPoint(focalPoint, focalPoint)
    t.TransformPoint(position, position)
    flyer = cameracontrol.Flyer(view)
    flyer.zoomTo(focalPoint, position)
Ejemplo n.º 2
0
    def resetCameraToRobotAbove(self, view):
        link = drcargs.getRobotConfig(self.robotName)["pelvisLink"]

        t = self.robotModel.getLinkFrame(link)
        if t is None:
            t = vtk.vtkTransform()

        focalPoint = [2, 0.0, 0.25]
        position = [1, 0.0, 15.25]  # to avoid singularities
        t.TransformPoint(focalPoint, focalPoint)
        t.TransformPoint(position, position)
        flyer = cameracontrol.Flyer(view)
        flyer.zoomTo(focalPoint, position)
Ejemplo n.º 3
0
    def resetCameraToRobot(self, view):
        link = drcargs.getRobotConfig(self.robotName)["pelvisLink"]

        t = self.robotModel.getLinkFrame(link)
        if t is None:
            t = vtk.vtkTransform()

        focalPoint = [0.0, 0.0, 0.25]
        position = [-4.0, -2.0, 2.25]
        t.TransformPoint(focalPoint, focalPoint)
        t.TransformPoint(position, position)
        flyer = cameracontrol.Flyer(view)
        flyer.zoomTo(focalPoint, position)
Ejemplo n.º 4
0
def zoomToPick(displayPoint, view):
    pickedPoint, prop, _ = vis.pickProp(displayPoint, view)
    if not prop:
        return
    flyer = cameracontrol.Flyer(view)
    flyer.zoomTo(pickedPoint)
Ejemplo n.º 5
0
 def __init__(self, view):
     self.bookmarks = {}
     self.view = view
     self.flyer = cameracontrol.Flyer(view)
     self.flyer.flyTime = 1.0