VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkPixel.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPixel.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef __vtkPixel_h
31 #define __vtkPixel_h
32 
33 #include "vtkCommonDataModelModule.h" // For export macro
34 #include "vtkCell.h"
35 
36 class vtkLine;
38 
39 class VTKCOMMONDATAMODEL_EXPORT vtkPixel : public vtkCell
40 {
41 public:
42  static vtkPixel *New();
43  vtkTypeMacro(vtkPixel,vtkCell);
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47 
48  int GetCellType() {return VTK_PIXEL;};
49  int GetCellDimension() {return 2;};
50  int GetNumberOfEdges() {return 4;};
51  int GetNumberOfFaces() {return 0;};
52  vtkCell *GetEdge(int edgeId);
53  vtkCell *GetFace(int) {return 0;};
54  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
55  void Contour(double value, vtkDataArray *cellScalars,
57  vtkCellArray *lines, vtkCellArray *polys,
58  vtkPointData *inPd, vtkPointData *outPd,
59  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
60  void Clip(double value, vtkDataArray *cellScalars,
62  vtkPointData *inPd, vtkPointData *outPd,
63  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
64  int insideOut);
65  int EvaluatePosition(double x[3], double* closestPoint,
66  int& subId, double pcoords[3],
67  double& dist2, double *weights);
68  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
69  double *weights);
71 
73  int GetParametricCenter(double pcoords[3]);
74 
75  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
76  double x[3], double pcoords[3], int& subId);
77  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
78  void Derivatives(int subId, double pcoords[3], double *values,
79  int dim, double *derivs);
80  virtual double *GetParametricCoords();
81 
83  static void InterpolationFunctions(double pcoords[3], double weights[4]);
85  static void InterpolationDerivs(double pcoords[3], double derivs[8]);
87 
89  virtual void InterpolateFunctions(double pcoords[3], double weights[4])
90  {
91  vtkPixel::InterpolationFunctions(pcoords,weights);
92  }
93  virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
94  {
95  vtkPixel::InterpolationDerivs(pcoords,derivs);
96  }
98 
99 protected:
100  vtkPixel();
101  ~vtkPixel();
102 
103  vtkLine *Line;
104 
105 private:
106  vtkPixel(const vtkPixel&); // Not implemented.
107  void operator=(const vtkPixel&); // Not implemented.
108 };
109 
110 //----------------------------------------------------------------------------
111 inline int vtkPixel::GetParametricCenter(double pcoords[3])
112 {
113  pcoords[0] = pcoords[1] = 0.5;
114  pcoords[2] = 0.0;
115  return 0;
116 }
117 
118 #endif
119 
120 
virtual void InterpolateFunctions(double pcoords[3], double weights[4])
Definition: vtkPixel.h:89
vtkLine * Line
Definition: vtkPixel.h:103
represent and manipulate cell attribute data
Definition: vtkCellData.h:37
a cell that represents an orthogonal quadrilateral
Definition: vtkPixel.h:39
Abstract class in support of both point location and point insertion.
static void InterpolationFunctions(double pcoords[3], double weights[4])
int GetNumberOfEdges()
Definition: vtkPixel.h:50
vtkCell * GetFace(int)
Definition: vtkPixel.h:53
static void InterpolationDerivs(double pcoords[3], double derivs[8])
int GetNumberOfFaces()
Definition: vtkPixel.h:51
virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
Definition: vtkPixel.h:93
int GetParametricCenter(double pcoords[3])
Definition: vtkPixel.h:111
int GetCellDimension()
Definition: vtkPixel.h:49
int GetCellType()
Definition: vtkPixel.h:48
object to represent cell connectivity
Definition: vtkCellArray.h:49