Skip to content

TriangleStrip

Introduction

vtkTriangleStrip is a concrete implementation of vtkCell to represent a 2D triangle strip. A triangle strip is a compact representation of triangles connected edge to edge in strip fashion. The connectivity of a triangle strip is three points defining an initial triangle, then for each additional triangle, a single point that, combined with the previous two points, defines the next triangle.

See Also

vtkCell

Methods

cellBoundary

Get the cell boundary of the triangle strip.

ArgumentTypeRequiredDescription
subIdNumberYesThe sub-id of the cell.
pcoordsVector3YesThe parametric coordinates.
ptsArray[Vector3]YesThe points of the cell.

decomposeStrip

Decomposes a triangle strip into individual triangles.

ArgumentTypeRequiredDescription
ptsvtkPointsYesPoints of the triangle strip
polysvtkCellArrayYesCell array to store the resulting triangles

derivatives

Derivatives of the triangle strip.

ArgumentTypeRequiredDescription
subIdNumberYes- The sub-id of the triangle.
pcoordsVector3Yes- The parametric coordinates.
valuesArray[Number]Yes- The values at the points.
dimNumberYes- The dimension.
derivsArray[Number]Yes- The derivatives.

evaluateLocation

Evaluate the location of a point in the triangle strip.

ArgumentTypeRequiredDescription
pcoordsVector3YesThe parametric coordinates of the point.
closestPointVector3YesThe closest point on the triangle strip.
weightsArray[Number]YesThe interpolation weights.

evaluatePosition

Evaluate the position of a point in the triangle strip.

ArgumentTypeRequiredDescription
xVector3YesThe point to evaluate.
closestPointVector3YesThe closest point on the triangle strip.
pcoordsVector3YesThe parametric coordinates.
dist2Array[Number]YesThe squared distance from the point to the triangle strip.
weightsArray[Number]YesThe interpolation weights.

extend

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

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

getCellDimension

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

getCellType

Get the cell type.

getEdge

Get the edge of the triangle strip.

ArgumentTypeRequiredDescription
edgeIdNumberYesThe edge ID to retrieve.

Returns

TypeDescription
vtkLineThe edge corresponding to the edge ID.

getNumberOfEdges

Get the number of edges in the triangle strip.

getNumberOfFaces

Get the number of faces in the triangle strip.

getParametricCenter

Get the parametric center of the triangle strip.

ArgumentTypeRequiredDescription
pcoordsVector3Yes- The parametric coordinates.

Returns

TypeDescription
NumberThe parametric center.

getPointArray

Get the point array of the triangle strip.

Returns

TypeDescription
Array[Number]The point array.

initialize

Initialize the triangle strip with points and point IDs.

ArgumentTypeRequiredDescription
pointsvtkPointsYesThe points of the triangle strip.
pointsIdsArray[Number]YesThe point IDs of the triangle strip.

intersectWithLine

Intersects a line with the triangle strip.

ArgumentTypeRequiredDescription
p1Vector3YesStart point of the line
p2Vector3YesEnd point of the line
tolNumberYesTolerance for intersection
xVector3YesIntersection point
pcoordsVector3YesParametric coordinates of the intersection

Returns

TypeDescription
BooleanTrue if the line intersects the triangle strip

newInstance

Method used to create a new instance of vtkTriangle.

ArgumentTypeRequiredDescription
initialValuesITriangleStripInitialValuesNofor pre-setting some of its content

triangulate

Triangulate the triangle strip.

Returns

TypeDescription
BooleanTrue if the triangulation is successful.