Skip to content

Box ​

Introduction ​

vtkBox 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 ​

addBounds ​

Add the bounds for the box.

ArgumentTypeRequiredDescription
boundsBoundsYes

addBox ​

ArgumentTypeRequiredDescription
otherYes

evaluateFunction ​

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

evaluateFunction ​

ArgumentTypeRequiredDescription
xVector3YesThe point coordinate.

extend ​

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

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

getBounds ​

Get the bounds for the box.

intersectWithLine ​

Intersect box with line and return the parametric values and points of the two intercepts

ArgumentTypeRequiredDescription
boundsYes
p1Yes
p2Yesreturns @object IBoxIntersections {t1, t2, x1, x2} object containing the t1, t2 parametric values and
x1, x2 coordinates of the line intercept points in the bounding box or undefined

newInstance ​

Method used to create a new instance of vtkBox.

ArgumentTypeRequiredDescription
initialValuesIBoxInitialValuesNofor pre-setting some of its content

setBounds ​

Set the bounds for the box.

ArgumentTypeRequiredDescription
boundsBoundsYesThe bounds for the box.