Skip to content

FPSMonitor ​

Introduction ​

vtkFPSMonitor is a DOM overlay reporting the mean and current frame rate of a render window, a rolling graph of the last frames and the render window statistics.

Methods ​

extend ​

Method used to decorate a given object (publicAPI+model) with vtkFPSMonitor characteristics.

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

getAddOnStats ​

Extra key/value pairs merged into the render window statistics listing.

getFpsMonitorContainer ​

Root element of the monitor.

newInstance ​

Method used to create a new instance of vtkFPSMonitor.

ArgumentTypeRequiredDescription
initialValuesIFPSMonitorInitialValuesNofor pre-setting some of its content

render ​

Redraw the title, the statistics listing and the graph.

resize ​

No-op kept for API symmetry with the other UI widgets.

setAddOnStats ​

Merge extra statistics into the ones reported by the render window.

ArgumentTypeRequiredDescription
addOnYes

setContainer ​

Attach the monitor to the given DOM element, detaching it from any previously set one.

ArgumentTypeRequiredDescription
elYes

setMonitorVisibility ​

ArgumentTypeRequiredDescription
titleBooleanNo(default: true)
graphBooleanNo(default: true)
infoBooleanNo(default: true)

setOrientation ​

Any mode other than 'horizontal' selects the vertical layout.

ArgumentTypeRequiredDescription
modeStringNo(default: 'horizontal')

setRenderWindow ​

Listen to the animation events of the render window interactor to sample the frame rate. Passing null unsubscribes.

ArgumentTypeRequiredDescription
rwYes

update ​

Alias of render().