Skip to content

Renderer ​

Introduction ​

vtkRenderer is a Viewport designed to hold 3D properties. It contains an instance of vtkCamera, a collection of vtkLights, and vtkActors. It exists within a RenderWindow. A RenderWindow may have multiple Renderers representing different viewports of the Window and Renderers can be layered on top of each other as well.

Methods ​

addActor ​

Add different types of props to the renderer.

ArgumentTypeRequiredDescription
actorvtkPropYesThe vtkProp instance.

addLight ​

Add a light to the list of lights.

ArgumentTypeRequiredDescription
lightvtkLightYesThe vtkLight instance.

addVolume ​

Add a volume to the renderer..

ArgumentTypeRequiredDescription
volumeYesThe vtkVolume instance.

allocateTime ​

Not Implemented yet

computeVisiblePropBounds ​

Compute the bounding box of all the visible props Used in ResetCamera() and ResetCameraClippingRange()

createLight ​

Create and add a light to renderer.

extend ​

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

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIRendererInitialValuesNo(default: {})

getActiveCamera ​

Get the active camera

getActiveCameraAndResetIfCreated ​

getActors ​

Return any actors in this renderer.

getActorsByReference ​

Return any actors in this renderer.

getAllocatedRenderTime ​

getAutomaticLightCreation ​

getBackingStore ​

getClippingRangeExpansion ​

getDelegate ​

getDraw ​

getEnvironmentTexture ​

getEnvironmentTextureDiffuseStrength ​

Returns the diffuse strength of the set environment texture.

getEnvironmentTextureSpecularStrength ​

Returns the specular strength of the set environment texture.

getErase ​

getInteractive ​

getLastRenderTimeInSeconds ​

getLastRenderingUsedDepthPeeling ​

getLayer ​

getLightFollowCamera ​

getLights ​

getLightsByReference ​

getMTime ​

Return the Modified Time which is a monotonic increasing integer global for all vtkObjects.

This allow to solve a question such as:

  • Is that object created/modified after another one?
  • Do I need to re-execute this filter, or not? ...

getMaximumNumberOfPeels ​

getNearClippingPlaneTolerance ​

getNumberOfPropsRendered ​

getOcclusionRatio ​

getPass ​

getPreserveColorBuffer ​

getPreserveDepthBuffer ​

getRenderWindow ​

getSelector ​

getTexturedbackground ​

getTimeFactor ​

getTransparent ​

getTwosidedlighting ​

getUseEnvironmentTextureAsBackground ​

Gets whether or not the environment texture is being used as the background for the view.

getUsedepthpeeling ​

getUseshadows ​

getVTKWindow ​

getVolumes ​

Return the collection of volumes.

getVolumesByReference ​

Return the collection of volumes.

hasLight ​

Check if the renderer already has the specified light.

ArgumentTypeRequiredDescription
lightvtkLightYesThe vtkLight instance.

isActiveCameraCreated ​

makeCamera ​

Create a new Camera suitable for use with this type of Renderer.

makeLight ​

Create a new Light suitable for use with this type of Renderer.

newInstance ​

Method use to create a new instance of vtkRenderer.

ArgumentTypeRequiredDescription
initialValuesIRendererInitialValuesNofor pre-setting some of its content

normalizedDisplayToWorld ​

requires the aspect ratio of the viewport as X/Y

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

onEvent ​

Adds an event listener.

projectionToView ​

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

removeActor ​

Remove an actor from the list of actors.

ArgumentTypeRequiredDescription
actorvtkPropYes

removeAllActors ​

Remove all actors from the list of actors.

removeAllLights ​

Remove all lights from the list of lights.

removeAllVolumes ​

Remove all volumes from the list of volumes.

removeLight ​

Remove a light from the list of lights.

ArgumentTypeRequiredDescription
lightvtkLightYesThe light object to remove.

removeVolume ​

Remove a volume from the list of volumes.

ArgumentTypeRequiredDescription
volumevtkVolumeYesThe volume object to remove.

resetCamera ​

Automatically set up the camera based on the visible actors.

The camera will reposition itself to view the center point of the actors, and move along its initial view plane normal (i.e., vector defined from camera position to focal point) so that all of the actors can be seen.

ArgumentTypeRequiredDescription
boundsBoundsNo

resetCameraClippingRange ​

Reset the camera clipping range based on a bounding box.

ArgumentTypeRequiredDescription
boundsBoundsNo

setActiveCamera ​

Specify the camera to use for this renderer.

ArgumentTypeRequiredDescription
cameravtkCameraYesThe camera object to use.

setAutomaticLightCreation ​

ArgumentTypeRequiredDescription
automaticLightCreationBooleanYes

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).

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).
aNumberYesDefines the alpha component (between 0 and 1).

setBackingStore ​

ArgumentTypeRequiredDescription
backingStore*Yes

setClippingRangeExpansion ​

ArgumentTypeRequiredDescription
clippingRangeExpansionNumberYes

setDelegate ​

ArgumentTypeRequiredDescription
delegateYes

setDraw ​

ArgumentTypeRequiredDescription
drawBooleanYes

setEnvironmentTexture ​

ArgumentTypeRequiredDescription
environmentTexturevtkTextureYes

setEnvironmentTextureDiffuseStrength ​

Sets the diffuse strength of the set environment texture.

ArgumentTypeRequiredDescription
diffuseStrengthnumberYesthe new diffuse strength.

setEnvironmentTextureSpecularStrength ​

Sets the specular strength of the set environment texture.

ArgumentTypeRequiredDescription
specularStrengthnumberYesthe new specular strength.

setErase ​

ArgumentTypeRequiredDescription
eraseBooleanYes

setInteractive ​

ArgumentTypeRequiredDescription
interactiveBooleanYes

setLayer ​

ArgumentTypeRequiredDescription
layerNumberYes

setLightCollection ​

Set the collection of lights.

ArgumentTypeRequiredDescription
lightsArray[vtkLight]Yes

setLightFollowCamera ​

ArgumentTypeRequiredDescription
lightFollowCameraBooleanYes

setMaximumNumberOfPeels ​

ArgumentTypeRequiredDescription
maximumNumberOfPeelsNumberYes

setNearClippingPlaneTolerance ​

ArgumentTypeRequiredDescription
nearClippingPlaneToleranceNumberYes

setOcclusionRatio ​

ArgumentTypeRequiredDescription
occlusionRatioNumberYes

setPass ​

ArgumentTypeRequiredDescription
passNumberYes

setPreserveColorBuffer ​

ArgumentTypeRequiredDescription
preserveColorBufferBooleanYes

setPreserveDepthBuffer ​

ArgumentTypeRequiredDescription
preserveDepthBufferBooleanYes

setRenderWindow ​

Specify the rendering window in which to draw.

ArgumentTypeRequiredDescription
renderWindowvtkRenderWindowYes

setTexturedBackground ​

ArgumentTypeRequiredDescription
texturedBackgroundBooleanYes

setTwoSidedLighting ​

ArgumentTypeRequiredDescription
twoSidedLightingBooleanYes

setUseDepthPeeling ​

ArgumentTypeRequiredDescription
useDepthPeelingBooleanYes

setUseEnvironmentTextureAsBackground ​

Sets whether or not to use the environment texture as the background for the view.

ArgumentTypeRequiredDescription
textureAsBackgroundnumberYes

setUseShadows ​

ArgumentTypeRequiredDescription
useShadowsBooleanYes

updateCamera ​

Ask the active camera to do whatever it needs to do prior to rendering.

updateGeometry ​

Not Implemented yet

updateLightGeometry ​

Update the geometry of the lights in the scene that are not in world space (for instance, Headlights or CameraLights that are attached to the camera).

updateLightsGeometryToFollowCamera ​

Ask the lights in the scene that are not in world space (for instance, Headlights or CameraLights that are attached to the camera) to update their geometry to match the active camera.

viewToProjection ​

Convert world point coordinates to view coordinates. requires the aspect ratio of the viewport as X/Y

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

viewToWorld ​

requires the aspect ratio of the viewport as X/Y

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

visibleActorCount ​

Get the number of visible actors.

visibleVolumeCount ​

Not Implemented yet

worldToNormalizedDisplay ​

requires the aspect ratio of the viewport as X/Y

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

worldToView ​

Convert world point coordinates to view coordinates.

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