VTK  9.2.6
vtkTriangleStrip.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkTriangleStrip.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
79#ifndef vtkTriangleStrip_h
80#define vtkTriangleStrip_h
81
82#include "vtkCell.h"
83#include "vtkCommonDataModelModule.h" // For export macro
84
85class vtkLine;
86class vtkTriangle;
88
89class VTKCOMMONDATAMODEL_EXPORT vtkTriangleStrip : public vtkCell
90{
91public:
93 vtkTypeMacro(vtkTriangleStrip, vtkCell);
94 void PrintSelf(ostream& os, vtkIndent indent) override;
95
97
100 int GetCellType() override { return VTK_TRIANGLE_STRIP; }
101 int GetCellDimension() override { return 2; }
102 int GetNumberOfEdges() override { return this->GetNumberOfPoints(); }
103 int GetNumberOfFaces() override { return 0; }
104 vtkCell* GetEdge(int edgeId) override;
105 vtkCell* GetFace(int vtkNotUsed(faceId)) override { return nullptr; }
106 int CellBoundary(int subId, const double pcoords[3], vtkIdList* pts) override;
107 void Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
108 vtkCellArray* verts, vtkCellArray* lines, vtkCellArray* polys, vtkPointData* inPd,
109 vtkPointData* outPd, vtkCellData* inCd, vtkIdType cellId, vtkCellData* outCd) override;
110 void Clip(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
111 vtkCellArray* polys, vtkPointData* inPd, vtkPointData* outPd, vtkCellData* inCd,
112 vtkIdType cellId, vtkCellData* outCd, int insideOut) override;
114
115 int EvaluatePosition(const double x[3], double closestPoint[3], int& subId, double pcoords[3],
116 double& dist2, double weights[]) override;
117 void EvaluateLocation(int& subId, const double pcoords[3], double x[3], double* weights) override;
118 int IntersectWithLine(const double p1[3], const double p2[3], double tol, double& t, double x[3],
119 double pcoords[3], int& subId) override;
120 int Triangulate(int index, vtkIdList* ptIds, vtkPoints* pts) override;
122 int subId, const double pcoords[3], const double* values, int dim, double* derivs) override;
123 int IsPrimaryCell() override { return 0; }
124
128 int GetParametricCenter(double pcoords[3]) override;
129
134 static void DecomposeStrip(int npts, const vtkIdType* pts, vtkCellArray* tris);
135
136protected:
139
142
143private:
144 vtkTriangleStrip(const vtkTriangleStrip&) = delete;
145 void operator=(const vtkTriangleStrip&) = delete;
146};
147
148#endif
object to represent cell connectivity
Definition: vtkCellArray.h:296
represent and manipulate cell attribute data
Definition: vtkCellData.h:151
abstract class to specify cell behavior
Definition: vtkCell.h:150
vtkIdType GetNumberOfPoints() const
Return the number of points in the cell.
Definition: vtkCell.h:230
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:165
list of point or cell ids
Definition: vtkIdList.h:143
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:119
cell represents a 1D line
Definition: vtkLine.h:143
represent and manipulate point attribute data
Definition: vtkPointData.h:151
represent and manipulate 3D points
Definition: vtkPoints.h:149
a cell that represents a triangle strip
int IntersectWithLine(const double p1[3], const double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId) override
Intersect with a ray.
void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd) override
See the vtkCell API for descriptions of these methods.
int GetNumberOfFaces() override
See the vtkCell API for descriptions of these methods.
void EvaluateLocation(int &subId, const double pcoords[3], double x[3], double *weights) override
Determine global coordinate (x[3]) from subId and parametric coordinates.
int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts) override
Generate simplices of proper dimension.
vtkTriangle * Triangle
int GetCellDimension() override
See the vtkCell API for descriptions of these methods.
int CellBoundary(int subId, const double pcoords[3], vtkIdList *pts) override
See the vtkCell API for descriptions of these methods.
vtkCell * GetFace(int vtkNotUsed(faceId)) override
See the vtkCell API for descriptions of these methods.
~vtkTriangleStrip() override
vtkCell * GetEdge(int edgeId) override
See the vtkCell API for descriptions of these methods.
static vtkTriangleStrip * New()
int GetNumberOfEdges() override
See the vtkCell API for descriptions of these methods.
void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut) override
See the vtkCell API for descriptions of these methods.
int GetParametricCenter(double pcoords[3]) override
Return the center of the point cloud in parametric coordinates.
void Derivatives(int subId, const double pcoords[3], const double *values, int dim, double *derivs) override
Compute derivatives given cell subId and parametric coordinates.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static void DecomposeStrip(int npts, const vtkIdType *pts, vtkCellArray *tris)
Given a triangle strip, decompose it into a list of (triangle) polygons.
int GetCellType() override
See the vtkCell API for descriptions of these methods.
int EvaluatePosition(const double x[3], double closestPoint[3], int &subId, double pcoords[3], double &dist2, double weights[]) override
Given a point x[3] return inside(=1), outside(=0) cell, or (-1) computational problem encountered; ev...
int IsPrimaryCell() override
Return whether this cell type has a fixed topology or whether the topology varies depending on the da...
a cell that represents a triangle
Definition: vtkTriangle.h:148
@ value
Definition: vtkX3D.h:226
@ index
Definition: vtkX3D.h:252
@ VTK_TRIANGLE_STRIP
Definition: vtkCellType.h:91
int vtkIdType
Definition: vtkType.h:332