Skip to main content
`Ctrl`+`K`

# `Plot3DWindow`: OpenGL scene and toolbar

This module provides a QMainWindow with a 3D scene and associated toolbar.

## `Plot3DWindow`

class Plot3DWindow(parent=None)

  Bases: `QMainWindow`

  OpenGL widget with a 3D viewport and an overview.

  getPlot3DWidget()

    Get the `Plot3DWidget` of this window

  setProjection(projection)

    Change the projection in use.

    Parameters:

      projection (str) – In ‘perspective’, ‘orthographic’.

  getProjection()

    Return the current camera projection mode as a str.

    See `setProjection()`

  centerScene()

    Position the center of the scene at the center of rotation.

  resetZoom()

    Reset the camera position to a default.

    Parameters:

      face (str) – The direction the camera is looking at: side, front, back, top, bottom, right, left. Default: front.

  getBackgroundColor()

    Returns the RGBA background color (QColor).

  setBackgroundColor(color)

    Set the background color of the OpenGL view.

    Parameters:

      color (QColor, str or array-like of 3 or 4 float in [0., 1.] or uint8) – RGB color of the isosurface: name, #RRGGBB or RGB values