RibbonFilter
Introduction
vtkRibbonFilter is a filter to create oriented ribbons from lines defined in polygonal dataset. The orientation of the ribbon is along the line segments and perpendicular to "projected" line normals. Projected line normals are the original line normals projected to be perpendicular to the local line segment. An offset angle can be specified to rotate the ribbon with respect to the normal.
Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkRibbonFilter 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 | IRibbonFilterInitialValues | No | (default: {}) |
getAngle
Get the angle (in degrees) of rotation about the line tangent used to orient the ribbon.
getDefaultNormal
Get the default normal used to orient the ribbon when no normals are provided in the input.
getDefaultNormalByReference
Get the default normal used to orient the ribbon when no normals are provided in the input.
getGenerateTCoords
Get the method used to generate texture coordinates.
getGenerateTCoordsAsString
Get the method used to generate texture coordinates as a string.
getTextureLength
Get the texture length, used when generating texture coordinates from length.
getUseDefaultNormal
Get whether to use the default normal to orient the ribbon when no normals are provided in the input.
getVaryWidth
Get whether to vary the width of the ribbon using scalar data.
getWidth
Get the width of the ribbon.
getWidthFactor
Get the width factor, used to scale the width when varying the width.
newInstance
Method used to create a new instance of vtkRibbonFilter
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IRibbonFilterInitialValues | No | for pre-setting some of its content |
requestData
| Argument | Type | Required | Description |
|---|---|---|---|
inData | Yes | ||
outData | Yes |
setAngle
Set the angle (in degrees) of rotation about the line tangent used to orient the ribbon. Default is 0.0.
| Argument | Type | Required | Description |
|---|---|---|---|
angle | Yes | The angle in degrees. |
Returns
| Type | Description |
|---|---|
| true if the angle is set successfully. |
setDefaultNormal
Set the default normal used to orient the ribbon when no normals are provided in the input. The default normal is a vector defined by three components (x,y,z). The default is (0,0,1).
| Argument | Type | Required | Description |
|---|---|---|---|
defaultNormal | Yes | The default normal as an array of three numbers or a Vector3. |
Returns
| Type | Description |
|---|---|
| true if the default normal is set successfully. |
setDefaultNormalFrom
Set the default normal used to orient the ribbon when no normals are provided in the input. The default normal is a vector defined by three components (x,y,z). The default is (0,0,1).
Returns
| Type | Description |
|---|---|
| true if the default normal is set successfully. |
setGenerateTCoords
Set the method used to generate texture coordinates. By default, texture coordinates are not generated.
| Argument | Type | Required | Description |
|---|---|---|---|
generateTCoords | Yes | The method to generate texture coordinates. |
Returns
| Type | Description |
|---|---|
| true if the method is set successfully. |
setTextureLength
Set the texture length, used when generating texture coordinates from length. The default is 1.0.
| Argument | Type | Required | Description |
|---|---|---|---|
textureLength | Yes | The texture length. |
Returns
| Type | Description |
|---|---|
| true if the texture length is set successfully. |
setUseDefaultNormal
Set whether to use the default normal to orient the ribbon when no normals are provided in the input. The default is false.
| Argument | Type | Required | Description |
|---|---|---|---|
useDefaultNormal | Yes | Whether to use the default normal. |
Returns
| Type | Description |
|---|---|
| true if the flag is set successfully. |
setVaryWidth
Set whether to vary the width of the ribbon using scalar data. By default, the width of the ribbon is uniform.
| Argument | Type | Required | Description |
|---|---|---|---|
varyWidth | Yes | Whether to vary the width of the ribbon. |
Returns
| Type | Description |
|---|---|
| true if the flag is set successfully. |
setWidth
Set the width of the ribbon. The width is the total width of the ribbon; the ribbon extends width/2 on either side of the line. The default is 0.5.
| Argument | Type | Required | Description |
|---|---|---|---|
width | Yes | The width of the ribbon. |
Returns
| Type | Description |
|---|---|
| true if the width is set successfully. |
setWidthFactor
Set the width factor, used to scale the width when varying the width. The default is 1.0.
| Argument | Type | Required | Description |
|---|---|---|---|
widthFactor | Yes | The width factor. |
Returns
| Type | Description |
|---|---|
| true if the width factor is set successfully. |