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.
| Argument | Type | Required | Description |
|---|---|---|---|
polyData | vtkPolyData | Yes | The polydata to add array to |
name | string | Yes | The name of the array to add (special handling for 'point', 'line, 'poly') |
numberOfTuples | Number | Yes | The number of tuples to (re)allocate. |
dataType | String | Yes | The typed array type name. |
numberOfComponents | Number | Yes | The number of components of the array. |
applyStyles
Apply the given styles to the given pipelines.
| Argument | Type | Required | Description |
|---|---|---|---|
pipelines | Record<string> | Yes | The pipelines to apply styles to. |
styles | IWidgetStyles | Yes | The styles to apply. |
activeActor | any | No | The 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.
| Argument | Type | Required | Description |
|---|---|---|---|
pipeline | IWidgetPipeline | Yes | of source, filter, mapper and actor to connect |
extend
Method use to decorate a given object (publicAPI+model) with vtkWidgetRepresentation 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 | IWidgetRepresentationInitialValues | No | (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.
| Argument | Type | Required | Description |
|---|---|---|---|
elementNames | Array[string] | Yes | The names of the elements to merge styles for. |
stylesToMerge | any | Yes | The 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.