def __init__(self, cam=None): if cam is None: # This allows use to dynamicly select cameras cam = GetActiveCamera() self.orientation = cam.GetOrientation() self.position = cam.GetPosition() self.focus = cam.GetFocalPoint() self.viewup = cam.GetViewUp()
def __init__(self, cam=None): """ @params: cam : vtkRenderingOpenGL2Python.vtkOpenGLCamera : optional : The camera you wish to update this object to. Totally optional """ if cam is None: # This allows use to dynamicly select cameras cam = GetActiveCamera() self.orientation = cam.GetOrientation() self.position = cam.GetPosition() self.focus = cam.GetFocalPoint() self.viewup = cam.GetViewUp()
def update(self, cam=None): """Updates the camera location to that which is in the currently activated view unless a vtkOpenGLCamera is specified. Args: cam (vtkRenderingOpenGL2Python.vtkOpenGLCamera) : The camera you wish to update this object to. Totally optional """ if cam is None: # This allows use to dynamicly select cameras cam = GetActiveCamera() self.orientation = cam.GetOrientation() self.position = cam.GetPosition() self.focus = cam.GetFocalPoint() self.viewup = cam.GetViewUp()