genre | Visualization |
author | Christian Schumann |
package | MeVisLab/Standard |
dll | SoUtils |
definition | utils.def |
see also | SoOrientationInset |
keywords | overlay |
The module SoViewportRegion renders a sub graph into a specified viewport region (VPR).
It can be compared with the picture-in-picture-function of modern TVs.
Interaction is possible in the displayed rendering. The module can also be used with SoView2D renderings. That way, you can build your own ortho-views very easily.
Connect the subgraph to the child input(s) of the SoViewportRegion.
The self-output should be connected to a viewer.
The viewer might display other graphs directly or may have additional SoViewportRegion attached (see example network).
Modify the viewport according to your needs. You can use one of the presets to start and then adjust the viewport settings according to your needs.
You can use SoViewportRegion in a nested manner. This means, a SoViewportRegion that is the child of another SoViewportRegion, may use the previously defined viewport region and modify it instead of modifying the original window ("Relate to existing viewport region" has to be activated; see example network). This may be useful if you want to define some kind of margin, which may be complicated with the viewport definition parameters alone.
Consume events in viewport: Bool | Mode (yPositionMode): Enum | Relate to existing viewport region: Bool |
Detect if mouse is over the viewport: Bool | Modify viewport region: Bool | renderDelayedPaths: Bool |
Domain (x1DomainMode): Enum | Mouse is over: Bool | X1: Float |
Domain (x2DomainMode): Enum | On: Bool | x1Title: String |
Domain (y1DomainMode): Enum | Preset: Enum | X2: Float |
Domain (y2DomainMode): Enum | projectionType: Enum | x2Title: String |
Forward events to child graph: Bool | Reference (x1ReferenceMode): Enum | Y1: Float |
In viewport only: Bool | Reference (x2ReferenceMode): Enum | y1Title: String |
Map to viewport: Bool | Reference (y1ReferenceMode): Enum | Y2: Float |
Mode (xPositionMode): Enum | Reference (y2ReferenceMode): Enum | y2Title: String |
If checked, the current viewport region will be modified.
Otherwise, the module uses the whole viewer or a previously attached viewport region.
If checked, the modifications will relate to an existing viewport region (which may have been defined by another SoViewportRegion instance).
Otherwise, the changes relate to the original window and the existing viewport region will be overridden for the child graph.
Defines the positioning mode in x-direction.
Values:
Title | Name | Description |
---|---|---|
Define left and right border of viewport region (VPR) | POSITION_MODE_MIN_AND_MAX | X1 and X2 act as minimum and maximum values horizontally. |
Define center and width of viewport region (VPR) | POSITION_MODE_CENTER_AND_SIZE | X1 and X2 act as center and size horizontally. |
Define left border and width of viewport region (VPR) | POSITION_MODE_MIN_AND_SIZE | X1 and X2 act as minimum value and size horizontally. |
Define right border and width of viewport region (VPR) | POSITION_MODE_MAX_AND_SIZE | X1 and X2 act as maximum value and size horizontally. |
Defines from where the values for X1 are measured.
Basically,the parameter allows to specify the alignment. Note, that you can use different reference for the left and right border for example. This allows for the definition of some kind of border for example (see example network).
Values:
Title | Name | Description |
---|---|---|
Left window border | REFERENCE_MODE_MIN | Value (X1, X2, Y1, Y2) relates to the left (x) / lower (y) border of the window (or previously defined viewport). |
Window center | REFERENCE_MODE_CENTER | Value relates window center (or to the center of a previously defined viewport). |
Right window border | REFERENCE_MODE_MAX | Value relates to the right (x) / upper (y) border of the window (or previously defined viewport). |
Defines how the value of X1 is interpreted.
Values:
Title | Name | Description |
---|---|---|
Pixels | DOMAIN_MODE_ABSOLUTE | Value is interpreted as an absolute value in pixel. |
Fraction of height | DOMAIN_MODE_RELATIVE_TO_HEIGHT | value is interpreted relative to the viewer's height. |
Fraction of width | DOMAIN_MODE_RELATIVE_TO_WIDTH | Value is interpreted relative to the viewer's width. |
Fraction of smallest dimension | DOMAIN_MODE_RELATIVE_TO_MIN | Value is interpreted relative to the viewer's minimum value. |
Fraction of largest dimension | DOMAIN_MODE_RELATIVE_TO_MAX | Value is interpreted relative to the viewer's maximum value. |
Defines from where the values for X2 are measured.
Values:
Title | Name |
---|---|
Left window border | REFERENCE_MODE_MIN |
Window center | REFERENCE_MODE_CENTER |
Right window border | REFERENCE_MODE_MAX |
Defines how the value of X2 is interpreted.
Values:
Title | Name |
---|---|
Pixels | DOMAIN_MODE_ABSOLUTE |
Fraction of height | DOMAIN_MODE_RELATIVE_TO_HEIGHT |
Fraction of width | DOMAIN_MODE_RELATIVE_TO_WIDTH |
Fraction of smallest dimension | DOMAIN_MODE_RELATIVE_TO_MIN |
Fraction of largest dimension | DOMAIN_MODE_RELATIVE_TO_MAX |
Defines the positioning mode in y-direction.
Values:
Title | Name |
---|---|
Define lower and upper border of viewport region (VPR) | POSITION_MODE_MIN_AND_MAX |
Define center and height of viewport region (VPR) | POSITION_MODE_CENTER_AND_SIZE |
Define lower border and height of viewport region (VPR) | POSITION_MODE_MIN_AND_SIZE |
Define upper border and height of viewport region (VPR) | POSITION_MODE_MAX_AND_SIZE |
Defines from where the values for Y1 are measured.
Values:
Title | Name |
---|---|
Lower window border | REFERENCE_MODE_MIN |
Window center | REFERENCE_MODE_CENTER |
Upper window border | REFERENCE_MODE_MAX |
Defines how the value of Y1 is interpreted.
Values:
Title | Name |
---|---|
Pixels | DOMAIN_MODE_ABSOLUTE |
Fraction of height | DOMAIN_MODE_RELATIVE_TO_HEIGHT |
Fraction of width | DOMAIN_MODE_RELATIVE_TO_WIDTH |
Fraction of smallest dimension | DOMAIN_MODE_RELATIVE_TO_MIN |
Fraction of largest dimension | DOMAIN_MODE_RELATIVE_TO_MAX |
Defines from where the values for Y2 are measured.
Values:
Title | Name |
---|---|
Lower window border | REFERENCE_MODE_MIN |
Window center | REFERENCE_MODE_CENTER |
Upper window border | REFERENCE_MODE_MAX |
Defines how the value of Y2 is interpreted.
Values:
Title | Name |
---|---|
Pixels | DOMAIN_MODE_ABSOLUTE |
Fraction of height | DOMAIN_MODE_RELATIVE_TO_HEIGHT |
Fraction of width | DOMAIN_MODE_RELATIVE_TO_WIDTH |
Fraction of smallest dimension | DOMAIN_MODE_RELATIVE_TO_MIN |
Fraction of largest dimension | DOMAIN_MODE_RELATIVE_TO_MAX |
If checked, the module detects whether the mouse is over the viewport.
Shows whether the mouse is over the viewport.
If checked, events will be evaluated by the child graph.
If checked, only events that occur in the viewport are forwarded to the child graph (should be checked in most cases).
If checked, the event coordinates will be mapped to the viewport region (should be checked in most cases).
Otherwise event handling inside the child graph will not work as expected.
If checked, all events that occur in the viewport region will be consumed.
Even if there is no module in the sub graph that reacts to the event, the event will be consumed by the SoViewportRegion module itself. This avoids the handling of the event by a module that is not in the SoViewportRegion.
Defines a preset for positioning the viewport inside a viewer.
Values:
Title | Name |
---|---|
Centered and third of dimensions | centeredThird |
Centered and third of minimum dimension | centeredMinThird |
Centered and fixed size | centeredFixed |
Upper left corner and third of minimum dimension | upperLeftMinThird |
Upper right corner and third of minimum dimension | upperRightMinThird |
Lower left corner and third of minimum dimension | lowerLeftMinThird |
Lower right corner and third of minimum dimension | lowerRightMinThird |
20 Pixel margin | margin |