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.
| Argument | Type | Required | Description |
|---|---|---|---|
subId | Number | Yes | The sub-id of the cell. |
pcoords | Vector3 | Yes | The parametric coordinates. |
pts | Array[Vector3] | Yes | The points of the cell. |
decomposeStrip
Decomposes a triangle strip into individual triangles.
| Argument | Type | Required | Description |
|---|---|---|---|
pts | vtkPoints | Yes | Points of the triangle strip |
polys | vtkCellArray | Yes | Cell array to store the resulting triangles |
derivatives
Derivatives of the triangle strip.
| Argument | Type | Required | Description |
|---|---|---|---|
subId | Number | Yes | - The sub-id of the triangle. |
pcoords | Vector3 | Yes | - The parametric coordinates. |
values | Array[Number] | Yes | - The values at the points. |
dim | Number | Yes | - The dimension. |
derivs | Array[Number] | Yes | - The derivatives. |
evaluateLocation
Evaluate the location of a point in the triangle strip.
| Argument | Type | Required | Description |
|---|---|---|---|
pcoords | Vector3 | Yes | The parametric coordinates of the point. |
closestPoint | Vector3 | Yes | The closest point on the triangle strip. |
weights | Array[Number] | Yes | The interpolation weights. |
evaluatePosition
Evaluate the position of a point in the triangle strip.
| Argument | Type | Required | Description |
|---|---|---|---|
x | Vector3 | Yes | The point to evaluate. |
closestPoint | Vector3 | Yes | The closest point on the triangle strip. |
pcoords | Vector3 | Yes | The parametric coordinates. |
dist2 | Array[Number] | Yes | The squared distance from the point to the triangle strip. |
weights | Array[Number] | Yes | The interpolation weights. |
extend
Method used to decorate a given object (publicAPI+model) with vtkTriangle 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 | ITriangleStripInitialValues | No | (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.
| Argument | Type | Required | Description |
|---|---|---|---|
edgeId | Number | Yes | The edge ID to retrieve. |
Returns
| Type | Description |
|---|---|
| vtkLine | The 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.
| Argument | Type | Required | Description |
|---|---|---|---|
pcoords | Vector3 | Yes | - The parametric coordinates. |
Returns
| Type | Description |
|---|---|
| Number | The parametric center. |
getPointArray
Get the point array of the triangle strip.
Returns
| Type | Description |
|---|---|
| Array[Number] | The point array. |
initialize
Initialize the triangle strip with points and point IDs.
| Argument | Type | Required | Description |
|---|---|---|---|
points | vtkPoints | Yes | The points of the triangle strip. |
pointsIds | Array[Number] | Yes | The point IDs of the triangle strip. |
intersectWithLine
Intersects a line with the triangle strip.
| Argument | Type | Required | Description |
|---|---|---|---|
p1 | Vector3 | Yes | Start point of the line |
p2 | Vector3 | Yes | End point of the line |
tol | Number | Yes | Tolerance for intersection |
x | Vector3 | Yes | Intersection point |
pcoords | Vector3 | Yes | Parametric coordinates of the intersection |
Returns
| Type | Description |
|---|---|
| Boolean | True if the line intersects the triangle strip |
newInstance
Method used to create a new instance of vtkTriangle.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | ITriangleStripInitialValues | No | for pre-setting some of its content |
triangulate
Triangulate the triangle strip.
Returns
| Type | Description |
|---|---|
| Boolean | True if the triangulation is successful. |