Skip to content

Sphere ​

Introduction ​

vtkSphere provides methods for creating a 1D cubic spline object from given parameters, and allows for the calculation of the spline value and derivative at any given point inside the spline intervals.

Methods ​

evaluateFunction ​

Given the point xyz (three floating value) evaluate the sphere equation.

ArgumentTypeRequiredDescription
xyzVector3YesThe point coordinate.

evaluateGradient ​

Given the point xyz (three floating values) evaluate the equation for the sphere gradient.

ArgumentTypeRequiredDescription
xyzVector3YesThe point coordinate.

extend ​

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

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

getCenter ​

Get the center of the sphere.

getCenterByReference ​

Get the center of the sphere.

getRadius ​

Get the radius of the sphere.

newInstance ​

Method used to create a new instance of vtkSphere.

ArgumentTypeRequiredDescription
initialValuesISphereInitialValuesNofor pre-setting some of its content

setCenter ​

Set the center of the sphere.

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

setCenter ​

Set the center of the sphere.

ArgumentTypeRequiredDescription
centerVector3YesThe center coordinate.

setCenterFrom ​

Set the center of the sphere.

ArgumentTypeRequiredDescription
centerVector3YesThe center coordinate.

setRadius ​

Set the radius of the sphere. Radius must be > 0. It can also be an array of 3 positive values for ellipsoids

ArgumentTypeRequiredDescription
radiusNumber or Vector3YesThe radius of the sphere.