Q3DScene

Q3DScene class provides description of the 3D scene being visualized. More

Inheritance diagram of PySide6.QtDataVisualization.Q3DScene

Synopsis

Functions

Static functions

Detailed Description

The 3D scene contains a single active camera and a single active light source. Visualized data is assumed to be at a fixed location.

The 3D scene also keeps track of the viewport in which visualization rendering is done, the primary subviewport inside the viewport where the main 3D data visualization view resides and the secondary subviewport where the 2D sliced view of the data resides. The subviewports are by default resized by the Q3DScene. To override the resize behavior you need to listen to both viewportChanged() and slicingActiveChanged() signals and recalculate the subviewports accordingly.

Also the scene has flag for tracking if the secondary 2D slicing view is currently active or not.

Note

Not all visualizations support the secondary 2D slicing view.

class PySide6.QtDataVisualization.Q3DScene([parent=None])
Parameters

parentPySide6.QtCore.QObject

Constructs a basic scene with one light and one camera in it. An optional parent parameter can be given and is then passed to QObject constructor.

PySide6.QtDataVisualization.Q3DScene.activeCamera()
Return type

PySide6.QtDataVisualization.Q3DCamera

PySide6.QtDataVisualization.Q3DScene.activeCameraChanged(camera)
Parameters

cameraPySide6.QtDataVisualization.Q3DCamera

PySide6.QtDataVisualization.Q3DScene.activeLight()
Return type

PySide6.QtDataVisualization.Q3DLight

See also

setActiveLight()

PySide6.QtDataVisualization.Q3DScene.activeLightChanged(light)
Parameters

lightPySide6.QtDataVisualization.Q3DLight

PySide6.QtDataVisualization.Q3DScene.devicePixelRatio()
Return type

float

PySide6.QtDataVisualization.Q3DScene.devicePixelRatioChanged(pixelRatio)
Parameters

pixelRatio – float

PySide6.QtDataVisualization.Q3DScene.graphPositionQuery()
Return type

PySide6.QtCore.QPoint

PySide6.QtDataVisualization.Q3DScene.graphPositionQueryChanged(position)
Parameters

positionPySide6.QtCore.QPoint

static PySide6.QtDataVisualization.Q3DScene.invalidSelectionPoint()
Return type

PySide6.QtCore.QPoint

Returns a QPoint signifying an invalid selection position.

PySide6.QtDataVisualization.Q3DScene.isPointInPrimarySubView(point)
Parameters

pointPySide6.QtCore.QPoint

Return type

bool

Returns whether the given point resides inside the primary subview or not. Returns true if the point is inside the primary subview.

Note

If subviews are superimposed, and the given point resides inside both, result is true only when the primary subview is on top.

PySide6.QtDataVisualization.Q3DScene.isPointInSecondarySubView(point)
Parameters

pointPySide6.QtCore.QPoint

Return type

bool

Returns whether the given point resides inside the secondary subview or not. Returns true if the point is inside the secondary subview.

Note

If subviews are superimposed, and the given point resides inside both, result is true only when the secondary subview is on top.

PySide6.QtDataVisualization.Q3DScene.isSecondarySubviewOnTop()
Return type

bool

PySide6.QtDataVisualization.Q3DScene.isSlicingActive()
Return type

bool

PySide6.QtDataVisualization.Q3DScene.primarySubViewport()
Return type

PySide6.QtCore.QRect

PySide6.QtDataVisualization.Q3DScene.primarySubViewportChanged(subViewport)
Parameters

subViewportPySide6.QtCore.QRect

PySide6.QtDataVisualization.Q3DScene.secondarySubViewport()
Return type

PySide6.QtCore.QRect

PySide6.QtDataVisualization.Q3DScene.secondarySubViewportChanged(subViewport)
Parameters

subViewportPySide6.QtCore.QRect

PySide6.QtDataVisualization.Q3DScene.secondarySubviewOnTopChanged(isSecondaryOnTop)
Parameters

isSecondaryOnTop – bool

PySide6.QtDataVisualization.Q3DScene.selectionQueryPosition()
Return type

PySide6.QtCore.QPoint

PySide6.QtDataVisualization.Q3DScene.selectionQueryPositionChanged(position)
Parameters

positionPySide6.QtCore.QPoint

PySide6.QtDataVisualization.Q3DScene.setActiveCamera(camera)
Parameters

cameraPySide6.QtDataVisualization.Q3DCamera

See also

activeCamera()

PySide6.QtDataVisualization.Q3DScene.setActiveLight(light)
Parameters

lightPySide6.QtDataVisualization.Q3DLight

See also

activeLight()

PySide6.QtDataVisualization.Q3DScene.setDevicePixelRatio(pixelRatio)
Parameters

pixelRatio – float

PySide6.QtDataVisualization.Q3DScene.setGraphPositionQuery(point)
Parameters

pointPySide6.QtCore.QPoint

PySide6.QtDataVisualization.Q3DScene.setPrimarySubViewport(primarySubViewport)
Parameters

primarySubViewportPySide6.QtCore.QRect

PySide6.QtDataVisualization.Q3DScene.setSecondarySubViewport(secondarySubViewport)
Parameters

secondarySubViewportPySide6.QtCore.QRect

PySide6.QtDataVisualization.Q3DScene.setSecondarySubviewOnTop(isSecondaryOnTop)
Parameters

isSecondaryOnTop – bool

PySide6.QtDataVisualization.Q3DScene.setSelectionQueryPosition(point)
Parameters

pointPySide6.QtCore.QPoint

PySide6.QtDataVisualization.Q3DScene.setSlicingActive(isSlicing)
Parameters

isSlicing – bool

PySide6.QtDataVisualization.Q3DScene.slicingActiveChanged(isSlicingActive)
Parameters

isSlicingActive – bool

PySide6.QtDataVisualization.Q3DScene.viewport()
Return type

PySide6.QtCore.QRect

PySide6.QtDataVisualization.Q3DScene.viewportChanged(viewport)
Parameters

viewportPySide6.QtCore.QRect