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.
| Argument | Type | Required | Description |
|---|---|---|---|
bounds | Bounds | Yes |
addBox
| Argument | Type | Required | Description |
|---|---|---|---|
other | Yes |
evaluateFunction
| Argument | Type | Required | Description |
|---|---|---|---|
x | Number | Yes | The x coordinate. |
y | Number | Yes | The y coordinate. |
z | Number | Yes | The z coordinate. |
evaluateFunction
| Argument | Type | Required | Description |
|---|---|---|---|
x | Vector3 | Yes | The point coordinate. |
extend
Method used to decorate a given object (publicAPI+model) with vtkBox 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 | IBoxInitialValues | No | (default: {}) |
getBounds
Get the bounds for the box.
intersectWithLine
Intersect box with line and return the parametric values and points of the two intercepts
| Argument | Type | Required | Description |
|---|---|---|---|
bounds | Yes | ||
p1 | Yes | ||
p2 | Yes | returns @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.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IBoxInitialValues | No | for pre-setting some of its content |
setBounds
Set the bounds for the box.
| Argument | Type | Required | Description |
|---|---|---|---|
bounds | Bounds | Yes | The bounds for the box. |