Skip to content

WidgetRepresentation ​

Methods ​

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.

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: {})

getCoincidentTopologyParameters ​

Gets the coincident topology parameters applied on the actor mappers

getPixelWorldHeightAtCoord ​

Static function to get the pixel size of a 3D point.

ArgumentTypeRequiredDescription
worldCoordArray[Number]Yes3D point in world coordinates
displayScaleParamsIDisplayScaleParamsYesDisplay and camera information

getScaleInPixels ​

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

newInstance ​

Method use to create a new instance of vtkWidgetRepresentation

ArgumentTypeRequiredDescription
initialValuesIWidgetRepresentationInitialValuesNofor pre-setting some of its content

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.