simple.camera Module

paraview.simple.camera.ResetCamera(view=None)[source]

Resets camera settings to make the whole scene visible while preserving orientation.

Parameters

view (View proxy.) – The camera for this view is reset. Optional, defaults to the active view.

paraview.simple.camera.ResetCameraToDirection(position=None, direction=None, up=None, view=None, bounds=None, sphere_bounds=None)[source]

Resets the settings of the camera to the given position and direction.

Parameters
  • position (3-element tuple or list of floats.) – Position of the camera. (default: [0,0,0])

  • direction (3-element tuple or list of floats.) – Direction of the camera. (default: [0, 0, -1])

  • up (3-element tuple or list of floats.) – If provided, will be used as the camera’s up direction.

  • view (View proxy.) – If provided, modifies the camera in this view.

  • bounds (6-element tuple or list of floats.) – If provided, reset the camera using that bounds (min_x, max_x, min_y, max_y, min_z, max_z).

  • sbounds (4-element tuple or list of floats.) – If provided, reset the camera using computed bounds from a sphere_bounds (center_x, center_y, center_z, radius).

>> ResetCameraToDirection( … direction=[-1, -1, -1], … sphere_bounds=(-5, -4, -3, 25), … )

>> ResetCameraToDirection( … direction=[-1, -1, -1], … bounds=( … -30, 20, … -29, 21, … -28, 22, … ), … )