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.
| 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. |
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: {}) |
getCoincidentTopologyParameters
Gets the coincident topology parameters applied on the actor mappers
getPixelWorldHeightAtCoord
Static function to get the pixel size of a 3D point.
| Argument | Type | Required | Description |
|---|---|---|---|
worldCoord | Array[Number] | Yes | 3D point in world coordinates |
displayScaleParams | IDisplayScaleParams | Yes | Display 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
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IWidgetRepresentationInitialValues | No | for 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.