Skip to content

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.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIFrustumSourceInitialValuesNo(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.

ArgumentTypeRequiredDescription
initialValuesIFrustumSourceInitialValuesNofor pre-setting some of its content

requestData

ArgumentTypeRequiredDescription
inDataYes
outDataYes

setOutputPointsPrecision

Set the output points precision.

ArgumentTypeRequiredDescription
precisionDesiredOutputPrecisionYes

setPlanes

Set the planes defining the frustum.

ArgumentTypeRequiredDescription
planesvtkPlanesYes

setShowLines

Set whether to show lines.

ArgumentTypeRequiredDescription
showLinesBooleanYes