VTK
dox/Common/DataModel/vtkPolyLine.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPolyLine.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 =========================================================================*/
00028 #ifndef __vtkPolyLine_h
00029 #define __vtkPolyLine_h
00030 
00031 #include "vtkCommonDataModelModule.h" // For export macro
00032 #include "vtkCell.h"
00033 
00034 class vtkPoints;
00035 class vtkCellArray;
00036 class vtkLine;
00037 class vtkDataArray;
00038 class vtkIncrementalPointLocator;
00039 class vtkCellData;
00040 
00041 class VTKCOMMONDATAMODEL_EXPORT vtkPolyLine : public vtkCell
00042 {
00043 public:
00044   static vtkPolyLine *New();
00045   vtkTypeMacro(vtkPolyLine,vtkCell);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047 
00049 
00054   static int GenerateSlidingNormals(vtkPoints *, vtkCellArray *, vtkDataArray *);
00055   static int GenerateSlidingNormals(vtkPoints *, vtkCellArray *, vtkDataArray *,
00056                                     double* firstNormal);
00058 
00060 
00061   int GetCellType() {return VTK_POLY_LINE;};
00062   int GetCellDimension() {return 1;};
00063   int GetNumberOfEdges() {return 0;};
00064   int GetNumberOfFaces() {return 0;};
00065   vtkCell *GetEdge(int vtkNotUsed(edgeId)) {return 0;};
00066   vtkCell *GetFace(int vtkNotUsed(faceId)) {return 0;};
00067   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00068   void Contour(double value, vtkDataArray *cellScalars,
00069                vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00070                vtkCellArray *lines, vtkCellArray *polys,
00071                vtkPointData *inPd, vtkPointData *outPd,
00072                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00073   void Clip(double value, vtkDataArray *cellScalars,
00074             vtkIncrementalPointLocator *locator, vtkCellArray *lines,
00075             vtkPointData *inPd, vtkPointData *outPd,
00076             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00077             int insideOut);
00078   int EvaluatePosition(double x[3], double* closestPoint,
00079                        int& subId, double pcoords[3],
00080                        double& dist2, double *weights);
00081   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00082                         double *weights);
00083   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00084                         double x[3], double pcoords[3], int& subId);
00085   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00086   void Derivatives(int subId, double pcoords[3], double *values,
00087                    int dim, double *derivs);
00088   int IsPrimaryCell() {return 0;}
00090 
00092   int GetParametricCenter(double pcoords[3]);
00093 
00095 
00097   virtual void InterpolateFunctions(double pcoords[3], double *weights);
00098   virtual void InterpolateDerivs(double pcoords[3], double *derivs);
00100 
00101 protected:
00102   vtkPolyLine();
00103   ~vtkPolyLine();
00104 
00105   vtkLine *Line;
00106 
00107 private:
00108   vtkPolyLine(const vtkPolyLine&);  // Not implemented.
00109   void operator=(const vtkPolyLine&);  // Not implemented.
00110 };
00111 
00112 #endif
00113 
00114