Inherits QObject.
|
|
QVariant | mapVoxelToDevice (float x, float y, float z) const |
|
QVariant | mapVoxelToDevice (const SbVec3f &voxelCoord) const |
|
QVariant | mapWorldToDevice (float x, float y, float z) const |
|
QVariant | mapWorldToDevice (const SbVec3f &voxelCoord) const |
|
int | getSliceAtDevicePosition (int x, int y) const |
|
QVariant | mapDeviceToWorld (int x, int y) |
|
QVariant | mapDeviceToVoxel (int x, int y) |
|
void | updateLayout (int viewportX, int viewportY, int viewportWidth, int viewportHeight, float pixelScaleFactor=1.0f) |
|
A class that wraps SoView2D modules for use in Python.
Its main purpose is to get at the mapping between voxel/world and device coordinates.
- Note
- You get this wrapper by calling .object() on a SoView2D module:
wrapper = ctx.module("SoView2D").object()
-
The mapping is always for the last view the SoView2D was rendered on, so the mapping might not be the correct one if the SoView2D is used on several views simultaneous, or while the view is resized. You can use the updateLayout() method to update the mapping to the required view.
-
These methods are only relevant for 2D display. SoView2D also allows to display slices in 3D, but mapping coordinates can only be done during OpenInventor event processing, because the current 3D camera parameters must be known.