Skip to content

Line ​

Introduction ​

vtkLine is a cell which representant a line. It contains static method to make some computations directly link to line.

See Also ​

vtkCell

Methods ​

evaluateLocation ​

Determine the global coordinates x' and parametric coordinates pcoords' in the cell.

evaluateOrientation ​

Determine the global orientation q' and parametric coordinates pcoords' in the cell. Use slerp to interpolate orientation Returns wether the orientation has been set in `q'

extend ​

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

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

getCellDimension ​

Get the topological dimensional of the cell (0, 1, 2 or 3).

getOrientations ​

Get the list of orientations (a list of quat) for each point of the line. Can be null if the line is not oriented

intersectWithLine ​

Compute the intersection point of the intersection between line and line defined by p1 and p2. tol Tolerance use for the position evaluation x is the point which intersect triangle (computed in function) pcoords parametric coordinates (computed in function) A javascript object is returned :

js
{
  evaluation: define if the line has been intersected or not
  subId: always set to 0
  t: tolerance of the intersection
}
ArgumentTypeRequiredDescription
p1Vector3YesThe first point coordinate.
p2Vector3YesThe second point coordinate.
tolNumberYesThe tolerance to use.
xVector3YesThe point which intersect triangle.
pcoordsVector3YesThe parametric coordinates.

newInstance ​

Method used to create a new instance of vtkLine.

ArgumentTypeRequiredDescription
initialValuesILineInitialValuesNofor pre-setting some of its content

setOrientations ​

ArgumentTypeRequiredDescription
orientationsYesThe list of orientation per point of the centerline