VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkPolyLine.h,v $ 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 =========================================================================*/ 00025 #ifndef __vtkPolyLine_h 00026 #define __vtkPolyLine_h 00027 00028 #include "vtkCell.h" 00029 00030 class vtkPoints; 00031 class vtkCellArray; 00032 class vtkLine; 00033 class vtkDataArray; 00034 class vtkPointLocator; 00035 class vtkCellData; 00036 00037 class VTK_FILTERING_EXPORT vtkPolyLine : public vtkCell 00038 { 00039 public: 00040 static vtkPolyLine *New(); 00041 vtkTypeRevisionMacro(vtkPolyLine,vtkCell); 00042 void PrintSelf(ostream& os, vtkIndent indent); 00043 00045 00050 static int GenerateSlidingNormals(vtkPoints *, vtkCellArray *, vtkDataArray *); 00051 static int GenerateSlidingNormals(vtkPoints *, vtkCellArray *, vtkDataArray *, 00052 double* firstNormal); 00054 00056 00057 int GetCellType() {return VTK_POLY_LINE;}; 00058 int GetCellDimension() {return 1;}; 00059 int GetNumberOfEdges() {return 0;}; 00060 int GetNumberOfFaces() {return 0;}; 00061 vtkCell *GetEdge(int vtkNotUsed(edgeId)) {return 0;}; 00062 vtkCell *GetFace(int vtkNotUsed(faceId)) {return 0;}; 00063 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts); 00064 void Contour(double value, vtkDataArray *cellScalars, 00065 vtkPointLocator *locator, vtkCellArray *verts, 00066 vtkCellArray *lines, vtkCellArray *polys, 00067 vtkPointData *inPd, vtkPointData *outPd, 00068 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd); 00069 void Clip(double value, vtkDataArray *cellScalars, 00070 vtkPointLocator *locator, vtkCellArray *lines, 00071 vtkPointData *inPd, vtkPointData *outPd, 00072 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, 00073 int insideOut); 00074 int EvaluatePosition(double x[3], double* closestPoint, 00075 int& subId, double pcoords[3], 00076 double& dist2, double *weights); 00077 void EvaluateLocation(int& subId, double pcoords[3], double x[3], 00078 double *weights); 00079 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t, 00080 double x[3], double pcoords[3], int& subId); 00081 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts); 00082 void Derivatives(int subId, double pcoords[3], double *values, 00083 int dim, double *derivs); 00084 int IsPrimaryCell() {return 0;} 00086 00088 int GetParametricCenter(double pcoords[3]); 00089 00091 00093 virtual void InterpolateFunctions(double pcoords[3], double *weights); 00094 virtual void InterpolateDerivs(double pcoords[3], double *derivs); 00096 00097 protected: 00098 vtkPolyLine(); 00099 ~vtkPolyLine(); 00100 00101 vtkLine *Line; 00102 00103 private: 00104 vtkPolyLine(const vtkPolyLine&); // Not implemented. 00105 void operator=(const vtkPolyLine&); // Not implemented. 00106 }; 00107 00108 #endif 00109 00110