Skip to content

PlaneSource ​

Introduction ​

vtkPlaneSource creates an m x n array of quadrilaterals arranged as a regular tiling in a plane. The plane is defined by specifying an origin point, and then two other points that, together with the origin, define two axes for the plane. These axes do not have to be orthogonal - so you can create a parallelogram. (The axes must not be parallel.) The resolution of the plane (i.e., number of subdivisions) is controlled by the ivars XResolution and YResolution.

By default, the plane is centered at the origin and perpendicular to the z-axis, with width and height of length 1 and resolutions set to 1.

Usage ​

js
import vtkPlaneSource from '@kitware/vtk.js/Filters/Sources/PlaneSource';

const plane = vtkPlaneSource.newInstance({ xResolution: 10, yResolution: 10 });
const polydata = plane.getOutputData();

Methods ​

extend ​

Method used to decorate a given object (publicAPI+model) with vtkPlaneSource characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIPlaneSourceInitialValuesNo(default: {})

getCenter ​

Get the center of the plane.

getCenterByReference ​

Get the center of the plane.

getNormal ​

Get the normal of the plane.

getNormalByReference ​

Get the normal of the plane.

getOrigin ​

Get the origin of the plane, lower-left corner.

getOriginByReference ​

Get the origin of the plane, lower-left corner.

getPoint1 ​

Get the x axes of the plane.

getPoint1ByReference ​

Get the x axes of the plane.

getPoint2 ​

Get the y axes of the plane.

getPoint2ByReference ​

Get the y axes of the plane.

getXResolution ​

Get the x resolution of the plane.

getYResolution ​

Get the y resolution of the plane.

newInstance ​

Method used to create a new instance of vtkPlaneSource.

ArgumentTypeRequiredDescription
initialValuesIPlaneSourceInitialValuesNofor pre-setting some of its content

requestData ​

ArgumentTypeRequiredDescription
inDataYes
outDataYes

rotate ​

Rotate plane around a given axis

ArgumentTypeRequiredDescription
angleYestheta Angle (radian) to rotate about
rotationAxisYesAxis to rotate around

setCenter ​

Set the center of the plane.

ArgumentTypeRequiredDescription
centerVector3YesThe coordinate of the center point.

setCenter ​

Set the center of the plane.

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate.
yNumberYesThe y coordinate.
zNumberYesThe z coordinate.

setNormal ​

Set the normal of the plane.

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate.
yNumberYesThe y coordinate.
zNumberYesThe z coordinate.

setNormal ​

Set the normal of the plane.

ArgumentTypeRequiredDescription
normalVector3YesThe normal coordinate.

setNormalFrom ​

Set the normal of the plane.

ArgumentTypeRequiredDescription
normalVector3YesThe normal coordinate.

setOrigin ​

Set the origin of the plane.

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate of the origin point.
yNumberYesThe y coordinate of the origin point.
zNumberYesThe z coordinate of the origin point.

setOrigin ​

Set the origin of the plane.

ArgumentTypeRequiredDescription
originVector3YesThe coordinate of the origin point.

setOriginFrom ​

Set the origin of the plane.

ArgumentTypeRequiredDescription
originVector3YesThe coordinate of the origin point.

setPoint1 ​

Specify a point defining the first axis of the plane.

ArgumentTypeRequiredDescription
point1Vector3Yes

setPoint1 ​

Specify a point defining the first axis of the plane.

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate.
yNumberYesThe y coordinate.
zNumberYesThe z coordinate.

setPoint2 ​

Specify a point defining the second axis of the plane.

ArgumentTypeRequiredDescription
point2Vector3Yes

setPoint2 ​

Specify a point defining the second axis of the plane.

ArgumentTypeRequiredDescription
xNumberYesThe x coordinate.
yNumberYesThe y coordinate.
zNumberYesThe z coordinate.

setXResolution ​

Set the number of facets used to represent the cone.

ArgumentTypeRequiredDescription
xResolutionNumberYes

setYResolution ​

Set the number of facets used to represent the cone.

ArgumentTypeRequiredDescription
yResolutionNumberYes

updatePlane ​

ArgumentTypeRequiredDescription
v1vec3Yes
v2vec3Yes