Skip to content

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.

ArgumentTypeRequiredDescription
propYes

addViewProp

Add a prop to the list of props.

ArgumentTypeRequiredDescription
propYes

displayToView

Convert display coordinates to view coordinates.

extend

Method use to decorate a given object (publicAPI+model) with vtkViewport characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIViewportInitialValuesNo(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

TypeDescription
Array[Number]

getViewportByReference

hasViewProp

ArgumentTypeRequiredDescription
propYes

newInstance

Method use to create a new instance of vtkViewport

normalizedDisplayToNormalizedViewport

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate.
yNumberYesThe y coordinate.
zNumberYesThe z coordinate.

normalizedDisplayToProjection

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate.
yNumberYesThe y coordinate.
zNumberYesThe z coordinate.

normalizedViewportToNormalizedDisplay

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate.
yNumberYesThe y coordinate.
zNumberYesThe z coordinate.

normalizedViewportToProjection

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate.
yNumberYesThe y coordinate.
zNumberYesThe z coordinate.

projectionToNormalizedDisplay

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate.
yNumberYesThe y coordinate.
zNumberYesThe z coordinate.

projectionToNormalizedViewport

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate.
yNumberYesThe y coordinate.
zNumberYesThe z coordinate.

removeActor2D

ArgumentTypeRequiredDescription
propYes

removeAllViewProps

removeViewProp

ArgumentTypeRequiredDescription
propYes

setBackground

Set the viewport background.

ArgumentTypeRequiredDescription
backgroundArray[Number]YesThe RGB color array.

setBackground

Set the viewport background.

ArgumentTypeRequiredDescription
rNumberYesDefines the red component (between 0 and 1).
gNumberYesDefines the green component (between 0 and 1).
bNumberYesDefines the blue component (between 0 and 1).

setBackground2

ArgumentTypeRequiredDescription
backgroundArray[Number]Yes

setBackground2

ArgumentTypeRequiredDescription
rNumberYesDefines the red component (between 0 and 1).
gNumberYesDefines the green component (between 0 and 1).
bNumberYesDefines the blue component (between 0 and 1).

setBackground2From

ArgumentTypeRequiredDescription
backgroundArray[Number]Yes

setBackgroundFrom

ArgumentTypeRequiredDescription
backgroundArray[Number]Yes

setViewport

Specify the viewport for the Viewport to draw in the rendering window. Each coordinate is 0 <= coordinate <= 1.0.

ArgumentTypeRequiredDescription
xminNumberYesThe xmin coordinate.
yminNumberYesThe ymin coordinate.
xmaxNumberYesThe xmax coordinate.
ymaxNumberYesThe 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.

ArgumentTypeRequiredDescription
viewportArray[Number]Yes

viewToDisplay