VTK
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 
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 
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
represent and manipulate point attribute data
Definition: vtkPointData.h:36
void PrintSelf(ostream &os, vtkIndent indent)
virtual double * GetParametricCoords()
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])
virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)=0
virtual void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)=0
virtual int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)=0
int GetNumberOfEdges()
Definition: vtkPixel.h:50
vtkCell * GetFace(int)
Definition: vtkPixel.h:53
int vtkIdType
Definition: vtkType.h:275
static void InterpolationDerivs(double pcoords[3], double derivs[8])
int GetNumberOfFaces()
Definition: vtkPixel.h:51
cell represents a 1D line
Definition: vtkLine.h:34
abstract class to specify cell behavior
Definition: vtkCell.h:61
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
Definition: vtkPixel.h:93
list of point or cell ids
Definition: vtkIdList.h:35
virtual void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)=0
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)=0
int GetParametricCenter(double pcoords[3])
Definition: vtkPixel.h:111
int GetCellDimension()
Definition: vtkPixel.h:49
virtual void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)=0
int GetCellType()
Definition: vtkPixel.h:48
object to represent cell connectivity
Definition: vtkCellArray.h:49
virtual vtkCell * GetEdge(int edgeId)=0
virtual void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd)=0
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
static vtkObject * New()
virtual int GetParametricCenter(double pcoords[3])
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points
Definition: vtkPoints.h:38