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
import vtkPlaneSource from '@kitware/vtk.js/Filters/Sources/PlaneSource'; |
Methods
extend
Method used to decorate a given object (publicAPI+model) with vtkPlaneSource 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 |
IPlaneSourceInitialValues | No | (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.
Argument | Type | Required | Description |
---|---|---|---|
initialValues |
IPlaneSourceInitialValues | No | for pre-setting some of its content |
requestData
Argument | Type | Required | Description |
---|---|---|---|
inData |
Yes | ||
outData |
Yes |
rotate
Rotate plane around a given axis
Argument | Type | Required | Description |
---|---|---|---|
angle |
Yes | theta Angle (radian) to rotate about | |
rotationAxis |
Yes | Axis to rotate around |
setCenter
Set the center of the plane.
Argument | Type | Required | Description |
---|---|---|---|
center |
Vector3 | Yes | The coordinate of the center point. |
setCenter
Set the center of the plane.
Argument | Type | Required | Description |
---|---|---|---|
x |
Number | Yes | The x coordinate. |
y |
Number | Yes | The y coordinate. |
z |
Number | Yes | The z coordinate. |
setNormal
Set the normal of the plane.
Argument | Type | Required | Description |
---|---|---|---|
x |
Number | Yes | The x coordinate. |
y |
Number | Yes | The y coordinate. |
z |
Number | Yes | The z coordinate. |
setNormal
Set the normal of the plane.
Argument | Type | Required | Description |
---|---|---|---|
normal |
Vector3 | Yes | The normal coordinate. |
setNormalFrom
Set the normal of the plane.
Argument | Type | Required | Description |
---|---|---|---|
normal |
Vector3 | Yes | The normal coordinate. |
setOrigin
Set the origin of the plane.
Argument | Type | Required | Description |
---|---|---|---|
x |
Number | Yes | The x coordinate of the origin point. |
y |
Number | Yes | The y coordinate of the origin point. |
z |
Number | Yes | The z coordinate of the origin point. |
setOrigin
Set the origin of the plane.
Argument | Type | Required | Description |
---|---|---|---|
origin |
Vector3 | Yes | The coordinate of the origin point. |
setOriginFrom
Set the origin of the plane.
Argument | Type | Required | Description |
---|---|---|---|
origin |
Vector3 | Yes | The coordinate of the origin point. |
setPoint1
Specify a point defining the first axis of the plane.
Argument | Type | Required | Description |
---|---|---|---|
point1 |
Vector3 | Yes |
setPoint1
Specify a point defining the first axis of the plane.
Argument | Type | Required | Description |
---|---|---|---|
x |
Number | Yes | The x coordinate. |
y |
Number | Yes | The y coordinate. |
z |
Number | Yes | The z coordinate. |
setPoint2
Specify a point defining the second axis of the plane.
Argument | Type | Required | Description |
---|---|---|---|
point2 |
Vector3 | Yes |
setPoint2
Specify a point defining the second axis of the plane.
Argument | Type | Required | Description |
---|---|---|---|
x |
Number | Yes | The x coordinate. |
y |
Number | Yes | The y coordinate. |
z |
Number | Yes | The z coordinate. |
setXResolution
Set the number of facets used to represent the cone.
Argument | Type | Required | Description |
---|---|---|---|
xResolution |
Number | Yes |
setYResolution
Set the number of facets used to represent the cone.
Argument | Type | Required | Description |
---|---|---|---|
yResolution |
Number | Yes |
updatePlane
Argument | Type | Required | Description |
---|---|---|---|
v1 |
vec3 | Yes | |
v2 |
vec3 | Yes |
Source
import { vec3 } from 'gl-matrix'; |
import { vec3, mat4 } from 'gl-matrix'; |