FrustumSource
Introduction
vtkFrustumSource creates a frustum defines by a set of planes. The frustum is represented with four-sided polygons. It is possible to specify extra lines to better visualize the field of view.
Usage
js
import vtkFrustumSource from '@kitware/vtk.js/Filters/Sources/FrustumSource';
const frustum = vtkFrustumSource.newInstance();
const camera = vtkCamera.newInstance();
camera.setClippingRange(0.1, 0.4);
const planesArray = camera.getFrustumPlanes(1.0);
const planes = vtkPlanes.newInstance();
planes.setFrustumPlanes(planesArray);
frustum.setPlanes(planes);
frustum.setShowLines(false);Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkFrustumSource 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 | IFrustumSourceInitialValues | No | (default: {}) |
getOutputPointsPrecision
Get the output points precision.
getPlanes
Get the planes defining the frustum.
getShowLines
Get whether to show lines.
newInstance
Method used to create a new instance of vtkFrustumSource.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IFrustumSourceInitialValues | No | for pre-setting some of its content |
requestData
| Argument | Type | Required | Description |
|---|---|---|---|
inData | Yes | ||
outData | Yes |
setOutputPointsPrecision
Set the output points precision.
| Argument | Type | Required | Description |
|---|---|---|---|
precision | DesiredOutputPrecision | Yes |
setPlanes
Set the planes defining the frustum.
| Argument | Type | Required | Description |
|---|---|---|---|
planes | vtkPlanes | Yes |
setShowLines
Set whether to show lines.
| Argument | Type | Required | Description |
|---|---|---|---|
showLines | Boolean | Yes |