Common/vtkLine.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Common/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 =========================================================================*/
    00044 #ifndef __vtkLine_h
    00045 #define __vtkLine_h
    00046
    00047 #include "vtkCell.h"
    00048
    00049 class VTK_COMMON_EXPORT vtkLine : public vtkCell
    00050 {
    00051 public:
    00052   static vtkLine *New();
    00053   vtkTypeRevisionMacro(vtkLine,vtkCell);
    00054
    00056
    00057   int GetCellType() {return VTK_LINE;};
    00058   int GetCellDimension() {return 1;};
    00059   int GetNumberOfEdges() {return 0;};
    00060   int GetNumberOfFaces() {return 0;};
    00061   vtkCell *GetEdge(int) {return 0;};
    00062   vtkCell *GetFace(int) {return 0;};
    00063   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
    00064   void Contour(float 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   int EvaluatePosition(float x[3], float* closestPoint,
    00070                        int& subId, float pcoords[3],
    00071                        float& dist2, float *weights);
    00072   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
    00073                         float *weights);
    00074   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
    00075   void Derivatives(int subId, float pcoords[3], float *values,
    00076                    int dim, float *derivs);
    00078
    00080
    00082   void Clip(float value, vtkDataArray *cellScalars,
    00083             vtkPointLocator *locator, vtkCellArray *lines,
    00084             vtkPointData *inPd, vtkPointData *outPd,
    00085             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
    00086             int insideOut);
    00088
    00090
    00092   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
    00093                         float x[3], float pcoords[3], int& subId);
    00095
    00096
    00098
    00103   static int Intersection(float p1[3], float p2[3], float x1[3], float x2[3],
    00104                           float& u, float& v);
    00106
    00107
    00109
    00111   static float DistanceToLine(float x[3], float p1[3], float p2[3],
    00112                               float &t, float closestPoint[3]);
    00114
    00115
    00119   static float DistanceToLine(float x[3], float p1[3], float p2[3]);
    00120
    00122   static void InterpolationFunctions(float pcoords[3], float weights[2]);
    00123
    00124 protected:
    00125   vtkLine();
    00126   ~vtkLine() {};
    00127
    00128 private:
    00129   vtkLine(const vtkLine&);  // Not implemented.
    00130   void operator=(const vtkLine&);  // Not implemented.
    00131 };
    00132
    00133 #endif
    00134
    00135