Viewport
Introduction
vtkViewport represents part or all of a RenderWindow. It holds a collection of props that will be rendered into the area it represents. This class also contains methods to convert between coordinate systems commonly used in rendering.
See Also
vtkActorvtkCoordinatevtkPropvtkRendervtkRenderWindowvtkVolume
Methods
PickPropFrom
Not Implemented yet
addActor2D
Adds a 2D actor to the scene.
| Argument | Type | Required | Description |
|---|---|---|---|
prop | Yes |
addViewProp
Add a prop to the list of props.
| Argument | Type | Required | Description |
|---|---|---|---|
prop | Yes |
displayToView
Convert display coordinates to view coordinates.
extend
Method use to decorate a given object (publicAPI+model) with vtkViewport characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IViewportInitialValues | No | (default: {}) |
getActors2D
getBackground
getBackground2
getBackground2ByReference
getBackgroundByReference
getSize
getViewProps
getViewPropsWithNestedProps
getViewport
Viewport for the Viewport to draw in the rendering window. Coordinates are expressed as (xmin,ymin,xmax,ymax), where each coordinate is 0 <= coordinate <= 1.0.
Returns
| Type | Description |
|---|---|
| Array[Number] |
getViewportByReference
hasViewProp
| Argument | Type | Required | Description |
|---|---|---|---|
prop | Yes |
newInstance
Method use to create a new instance of vtkViewport
normalizedDisplayToNormalizedViewport
| Argument | Type | Required | Description |
|---|---|---|---|
x | Number | Yes | The x coordinate. |
y | Number | Yes | The y coordinate. |
z | Number | Yes | The z coordinate. |
normalizedDisplayToProjection
| Argument | Type | Required | Description |
|---|---|---|---|
x | Number | Yes | The x coordinate. |
y | Number | Yes | The y coordinate. |
z | Number | Yes | The z coordinate. |
normalizedViewportToNormalizedDisplay
| Argument | Type | Required | Description |
|---|---|---|---|
x | Number | Yes | The x coordinate. |
y | Number | Yes | The y coordinate. |
z | Number | Yes | The z coordinate. |
normalizedViewportToProjection
| Argument | Type | Required | Description |
|---|---|---|---|
x | Number | Yes | The x coordinate. |
y | Number | Yes | The y coordinate. |
z | Number | Yes | The z coordinate. |
projectionToNormalizedDisplay
| Argument | Type | Required | Description |
|---|---|---|---|
x | Number | Yes | The x coordinate. |
y | Number | Yes | The y coordinate. |
z | Number | Yes | The z coordinate. |
projectionToNormalizedViewport
| Argument | Type | Required | Description |
|---|---|---|---|
x | Number | Yes | The x coordinate. |
y | Number | Yes | The y coordinate. |
z | Number | Yes | The z coordinate. |
removeActor2D
| Argument | Type | Required | Description |
|---|---|---|---|
prop | Yes |
removeAllViewProps
removeViewProp
| Argument | Type | Required | Description |
|---|---|---|---|
prop | Yes |
setBackground
Set the viewport background.
| Argument | Type | Required | Description |
|---|---|---|---|
background | Array[Number] | Yes | The RGB color array. |
setBackground
Set the viewport background.
| Argument | Type | Required | Description |
|---|---|---|---|
r | Number | Yes | Defines the red component (between 0 and 1). |
g | Number | Yes | Defines the green component (between 0 and 1). |
b | Number | Yes | Defines the blue component (between 0 and 1). |
setBackground2
| Argument | Type | Required | Description |
|---|---|---|---|
background | Array[Number] | Yes |
setBackground2
| Argument | Type | Required | Description |
|---|---|---|---|
r | Number | Yes | Defines the red component (between 0 and 1). |
g | Number | Yes | Defines the green component (between 0 and 1). |
b | Number | Yes | Defines the blue component (between 0 and 1). |
setBackground2From
| Argument | Type | Required | Description |
|---|---|---|---|
background | Array[Number] | Yes |
setBackgroundFrom
| Argument | Type | Required | Description |
|---|---|---|---|
background | Array[Number] | Yes |
setViewport
Specify the viewport for the Viewport to draw in the rendering window. Each coordinate is 0 <= coordinate <= 1.0.
| Argument | Type | Required | Description |
|---|---|---|---|
xmin | Number | Yes | The xmin coordinate. |
ymin | Number | Yes | The ymin coordinate. |
xmax | Number | Yes | The xmax coordinate. |
ymax | Number | Yes | The ymax coordinate. |
setViewportFrom
Specify the viewport for the Viewport to draw in the rendering window. Coordinates are expressed as [xmin, ymin, xmax, ymax], where each coordinate is 0 <= coordinate <= 1.0.
| Argument | Type | Required | Description |
|---|---|---|---|
viewport | Array[Number] | Yes |