RodTracker.ui.view3d
TBD
- class View3D(*args, **kwargs)[source]
Bases:
QWidgetA custom
QWidgetfor display of 3D rod data.- Parameters:
*args (iterable) – Positional arguments for the
QWidgetsuperclass.**kwargs (dict) – Keyword arguments for the
QWidgetsuperclass.
- view
- Type:
Qt3DWindow
- camera
- Type:
QOrbitCameraController
- scene
Root entity for the 3D scene.
- Type:
QEntity
- static create_box(root: QEntity) Tuple[QCuboidMesh, QExtrudedTextMesh, QTransform, QExtrudedTextMesh, QTransform][source]
Creates a shaded box as the representation of the experiment container.
The container and the descriptive text meshes and transformations are returned for later adjustment of dimensions, e.g. during settings changes.
- Parameters:
root (Qt3DCore.QEntity) – Root entity for the whole displayed 3D scene.
- Returns:
Tuple[QCuboidMesh, QExtrudedTextMesh, Qt3DCore.QTransform, – QExtrudedTextMesh, Qt3DCore.QTransform] Returns the box mesh, the top text mesh, the top text transformation, the front text mesh, and the front text transformation.
- static create_fences(root: QEntity) List[QEntity][source]
Create bars that act as visual indicators for the edges of the experiment container.
- Parameters:
root (Qt3DCore.QEntity) – Root entity for the whole displayed 3D scene.
- Returns:
List[Qt3DCore.QEntity] – List of bars.
- static create_walls(root: QEntity)[source]
Create walls for the experimental container, except top and front.
- Parameters:
root (Qt3DCore.QEntity) – Root entity for the whole displayed 3D scene.
- static init_camera(view: Qt3DWindow, scene: QEntity) QCamera[source]
Initilizes the 3D view camera and camera controller.
- Parameters:
view (Qt3DWindow)
scene (Qt3DCore.QEntity) – Root entity for the whole displayed 3D scene.
- Returns:
QCamera
- rods: List[QEntity] = []
Entities that resemble a rod each.
Default is
[].- Type:
List[QEntity]