Introduction
vtkGenericRenderWindow provides a skeleton for implementing a render window
using one’s own OpenGL context and drawable.
Methods
delete
Release GL context
extend
Method used to decorate a given object (publicAPI+model) with vtkGenericRenderWindow 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 |
IGenericRenderWindowInitialValues | No | (default: {}) |
getApiSpecificRenderWindow
Get the render back-end specific render window.
getContainer
Get container element
getInteractor
Get interactor object
getRenderWindow
getRenderer
newInstance
Method used to create a new instance of vtkGenericRenderWindow
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues |
IGenericRenderWindowInitialValues | No | for pre-setting some of its content |
onResize
Method to register callback when the object is resize().
| Argument | Type | Required | Description |
|---|---|---|---|
callback |
Yes | function |
Returns
| Type | Description |
|---|---|
| subscription object so you can easily unsubscribe later on |
resize
Handle window resize
setBackground
Set background color
| Argument | Type | Required | Description |
|---|---|---|---|
background |
RGBColor or RGBAColor | Yes | The background color. |
Returns
| Type | Description |
|---|---|
| true if the background color actually changed, false otherwise |
setContainer
Set thecontainer element
| Argument | Type | Required | Description |
|---|---|---|---|
el |
HTMLElement | Yes | The container element. |
Source
import { vtkObject, vtkSubscription } from '../../../interfaces'; |
import macro from 'vtk.js/Sources/macros'; |