Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkLine.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkLine.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00031 #ifndef __vtkLine_h
00032 #define __vtkLine_h
00033 
00034 #include "vtkCell.h"
00035 
00036 class VTK_COMMON_EXPORT vtkLine : public vtkCell
00037 {
00038 public:
00039   static vtkLine *New();
00040   vtkTypeRevisionMacro(vtkLine,vtkCell);
00041 
00043 
00044   int GetCellType() {return VTK_LINE;};
00045   int GetCellDimension() {return 1;};
00046   int GetNumberOfEdges() {return 0;};
00047   int GetNumberOfFaces() {return 0;};
00048   vtkCell *GetEdge(int) {return 0;};
00049   vtkCell *GetFace(int) {return 0;};
00050   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00051   void Contour(float value, vtkDataArray *cellScalars, 
00052                vtkPointLocator *locator, vtkCellArray *verts, 
00053                vtkCellArray *lines, vtkCellArray *polys, 
00054                vtkPointData *inPd, vtkPointData *outPd,
00055                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00056   int EvaluatePosition(float x[3], float* closestPoint,
00057                        int& subId, float pcoords[3], 
00058                        float& dist2, float *weights);
00059   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00060                         float *weights);
00061   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00062   void Derivatives(int subId, float pcoords[3], float *values, 
00063                    int dim, float *derivs);
00065 
00067 
00069   void Clip(float value, vtkDataArray *cellScalars, 
00070             vtkPointLocator *locator, vtkCellArray *lines,
00071             vtkPointData *inPd, vtkPointData *outPd,
00072             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00073             int insideOut);
00075 
00077 
00079   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00080                         float x[3], float pcoords[3], int& subId);
00082 
00083 
00085 
00090   static int Intersection(float p1[3], float p2[3], float x1[3], float x2[3],
00091                           float& u, float& v);
00093 
00094   
00096 
00098   static float DistanceToLine(float x[3], float p1[3], float p2[3], 
00099                               float &t, float closestPoint[3]);
00101   
00102   
00106   static float DistanceToLine(float x[3], float p1[3], float p2[3]);
00107 
00109   static void InterpolationFunctions(float pcoords[3], float weights[2]);
00110 
00111 protected:
00112   vtkLine();
00113   ~vtkLine() {};
00114 
00115 private:
00116   vtkLine(const vtkLine&);  // Not implemented.
00117   void operator=(const vtkLine&);  // Not implemented.
00118 };
00119 
00120 #endif
00121 
00122