#NEWLINE# def initView( self , view ) : #NEWLINE# #INDENT# self . view = ( view or app . getViewManager ( ) . createView ( 'Camera View' , 'VTK View' ) ) #NEWLINE# self . renderers = [ self . view . renderer ( ) ] #NEWLINE# renWin = self . view . renderWindow ( ) #NEWLINE# renWin . SetNumberOfLayers ( 3 ) #NEWLINE# for i in [ 1 , 2 ] : #NEWLINE# #INDENT# ren = vtk . vtkRenderer ( ) #NEWLINE# ren . SetLayer ( 2 ) #NEWLINE# ren . SetActiveCamera ( self . view . camera ( ) ) #NEWLINE# renWin . AddRenderer ( ren ) #NEWLINE# self . renderers . append ( ren ) #NEWLINE# #UNINDENT# def applyCustomBounds( ) : #NEWLINE# #INDENT# self . view . addCustomBounds ( [ ( - 100 ) , 100 , ( - 100 ) , 100 , ( - 100 ) , 100 ] ) #NEWLINE# #UNINDENT# self . view . connect ( 'computeBoundsRequest(ddQVTKWidgetView*)' , applyCustomBounds ) #NEWLINE# app . setCameraTerrainModeEnabled ( self . view , True ) #NEWLINE# self . resetCamera ( )