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

Common/vtkPixel.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPixel.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 =========================================================================*/
00034 #ifndef __vtkPixel_h
00035 #define __vtkPixel_h
00036 
00037 #include "vtkCell.h"
00038 
00039 class vtkLine;
00040 
00041 class VTK_COMMON_EXPORT vtkPixel : public vtkCell
00042 {
00043 public:
00044   static vtkPixel *New();
00045   vtkTypeRevisionMacro(vtkPixel,vtkCell);
00046 
00048 
00049   int GetCellType() {return VTK_PIXEL;};
00050   int GetCellDimension() {return 2;};
00051   int GetNumberOfEdges() {return 4;};
00052   int GetNumberOfFaces() {return 0;};
00053   vtkCell *GetEdge(int edgeId);
00054   vtkCell *GetFace(int) {return 0;};
00055   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00056   void Contour(float value, vtkDataArray *cellScalars, 
00057                vtkPointLocator *locator, vtkCellArray *verts, 
00058                vtkCellArray *lines, vtkCellArray *polys,
00059                vtkPointData *inPd, vtkPointData *outPd,
00060                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00061   void Clip(float value, vtkDataArray *cellScalars, 
00062             vtkPointLocator *locator, vtkCellArray *polys,
00063             vtkPointData *inPd, vtkPointData *outPd,
00064             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00065             int insideOut);
00066   int EvaluatePosition(float x[3], float* closestPoint,
00067                        int& subId, float pcoords[3],
00068                        float& dist2, float *weights);
00069   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00070                         float *weights);
00071   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00072                         float x[3], float pcoords[3], int& subId);
00073   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00074   void Derivatives(int subId, float pcoords[3], float *values, 
00075                    int dim, float *derivs);
00077 
00079 
00080   static void InterpolationFunctions(float pcoords[3], float weights[4]);
00081   static void InterpolationDerivs(float pcoords[3], float derivs[8]);
00083 
00084   
00085 protected:
00086   vtkPixel();
00087   ~vtkPixel();
00088 
00089   vtkLine *Line;
00090 
00091 private:
00092   vtkPixel(const vtkPixel&);  // Not implemented.
00093   void operator=(const vtkPixel&);  // Not implemented.
00094 };
00095 
00096 #endif
00097 
00098