Skip to content

WidgetRepresentation ​

Methods ​

addActor ​

Add an actor and apply the representation's mapper settings.

allocateArray ​

Allocate or resize a vtkPoint(name='point'), vtkCellArray (name= 'line'|'poly') or vtkDataArray (name=any) and add it to the vtkPolyData. If allocated, the array is automatically added to the polydata Connects mapper to actor.

ArgumentTypeRequiredDescription
polyDatavtkPolyDataYesThe polydata to add array to
namestringYesThe name of the array to add (special handling for 'point', 'line, 'poly')
numberOfTuplesNumberYesThe number of tuples to (re)allocate.
dataTypeStringYesThe typed array type name.
numberOfComponentsNumberYesThe number of components of the array.

applyStyles ​

Apply the given styles to the given pipelines.

ArgumentTypeRequiredDescription
pipelinesRecord<string>YesThe pipelines to apply styles to.
stylesIWidgetStylesYesThe styles to apply.
activeActoranyNoThe currently active actor.

connectPipeline ​

If provided, connects source (dataset or filter) to filter. If provided, connects filter (otherwise source) to mapper If provided, connects glyph as 2nd input to mapper. This is typically for the glyph mapper. Connects mapper to actor.

ArgumentTypeRequiredDescription
pipelineIWidgetPipelineYesof source, filter, mapper and actor to connect

extend ​

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

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

getActiveColor ​

Gets the scalar value the mapper turns into the active color.

getActiveScaleFactor ​

Gets the scale applied to the representation while it is active.

getCoincidentTopologyParameters ​

Gets the coincident topology parameters applied on the actor mappers

getDisplayScaleParams ​

Gets the current view and camera scale parameters.

getScaleInPixels ​

Gets wether actors should have a fix size in display coordinates.

mergeStyles ​

Merge the given styles together for the given element names.

ArgumentTypeRequiredDescription
elementNamesArray[string]YesThe names of the elements to merge styles for.
stylesToMergeanyYesThe styles to merge.

setCoincidentTopologyParameters ​

Sets the coincident topology parameters applied on the actor mappers

setDisplayScaleParams ​

Sets the current view and camera scale parameters. Called by the WidgetManager.

setScaleInPixels ​

Sets wether actors should have a fix size in display coordinates.

updateActorVisibility ​

Update actor visibility for the current rendering pass.