Open topic with navigation
<window>.setCropRect
Set the crop rectangle for the window projection matrix
<window>.setCropRect( |
|
rect |
mode = viz.WORLD |
) |
|
rect
Specifies the [left, bottom, right, top] crop rectangle in normalized (0-1) projection frustum coordinates.
mode = viz.WORLD
One of the following modes:
viz.WORLD | Apply the crop rectangle to the world projection matrix. |
viz.ORTHO | Apply the crop rectangle to the orthographic projection matrix. |
Remarks
This command will set the crop rectangle of the window projection matrix in normalized (0-1) units. Each component of the rectangle specifies the percentage of the width or height of the frustum to crop the edge to.
This is typically used in cluster setups to assigned certain portions of the overall projection frustum to a specific client.
The default crop rectangle is [0, 0, 1, 1], which corresponds to the entire projection frustum.
Return Value
None
Example
# Crop projection matrix to left half for client 1
with viz.cluster.MaskedContext(viz.CLIENT1):
viz.MainWindow.setCropRect([0, 0, 0.5, 1])
# Crop projection matrix to right half for client 2
with viz.cluster.MaskedContext(viz.CLIENT2):
viz.MainWindow.setCropRect([0.5, 0, 1, 1])
See also