VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkTriangleStrip.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00032 #ifndef vtkTriangleStrip_h 00033 #define vtkTriangleStrip_h 00034 00035 #include "vtkCommonDataModelModule.h" // For export macro 00036 #include "vtkCell.h" 00037 00038 class vtkLine; 00039 class vtkTriangle; 00040 class vtkIncrementalPointLocator; 00041 00042 class VTKCOMMONDATAMODEL_EXPORT vtkTriangleStrip : public vtkCell 00043 { 00044 public: 00045 static vtkTriangleStrip *New(); 00046 vtkTypeMacro(vtkTriangleStrip,vtkCell); 00047 void PrintSelf(ostream& os, vtkIndent indent); 00048 00050 00051 int GetCellType() {return VTK_TRIANGLE_STRIP;}; 00052 int GetCellDimension() {return 2;}; 00053 int GetNumberOfEdges() {return this->GetNumberOfPoints();}; 00054 int GetNumberOfFaces() {return 0;}; 00055 vtkCell *GetEdge(int edgeId); 00056 vtkCell *GetFace(int vtkNotUsed(faceId)) {return 0;}; 00057 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts); 00058 void Contour(double value, vtkDataArray *cellScalars, 00059 vtkIncrementalPointLocator *locator, vtkCellArray *verts, 00060 vtkCellArray *lines, vtkCellArray *polys, 00061 vtkPointData *inPd, vtkPointData *outPd, 00062 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd); 00063 void Clip(double value, vtkDataArray *cellScalars, 00064 vtkIncrementalPointLocator *locator, vtkCellArray *polys, 00065 vtkPointData *inPd, vtkPointData *outPd, 00066 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, 00067 int insideOut); 00069 00070 int EvaluatePosition(double x[3], double* closestPoint, 00071 int& subId, double pcoords[3], 00072 double& dist2, double *weights); 00073 void EvaluateLocation(int& subId, double pcoords[3], double x[3], 00074 double *weights); 00075 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t, 00076 double x[3], double pcoords[3], int& subId); 00077 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts); 00078 void Derivatives(int subId, double pcoords[3], double *values, 00079 int dim, double *derivs); 00080 int IsPrimaryCell() {return 0;} 00081 00083 int GetParametricCenter(double pcoords[3]); 00084 00088 static void DecomposeStrip(int npts, vtkIdType *pts, vtkCellArray *tris); 00089 00091 00093 virtual void InterpolateFunctions(double pcoords[3], double *weights); 00094 virtual void InterpolateDerivs(double pcoords[3], double *derivs); 00096 00097 protected: 00098 vtkTriangleStrip(); 00099 ~vtkTriangleStrip(); 00100 00101 vtkLine *Line; 00102 vtkTriangle *Triangle; 00103 00104 private: 00105 vtkTriangleStrip(const vtkTriangleStrip&); // Not implemented. 00106 void operator=(const vtkTriangleStrip&); // Not implemented. 00107 }; 00108 00109 #endif 00110 00111