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 "vtkCell.h"
34 
35 class vtkLine;
37 
39 {
40 public:
41  static vtkPixel *New();
42  vtkTypeMacro(vtkPixel,vtkCell);
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
47  int GetCellType() {return VTK_PIXEL;};
48  int GetCellDimension() {return 2;};
49  int GetNumberOfEdges() {return 4;};
50  int GetNumberOfFaces() {return 0;};
51  vtkCell *GetEdge(int edgeId);
52  vtkCell *GetFace(int) {return 0;};
53  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
54  void Contour(double value, vtkDataArray *cellScalars,
56  vtkCellArray *lines, vtkCellArray *polys,
57  vtkPointData *inPd, vtkPointData *outPd,
58  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
59  void Clip(double value, vtkDataArray *cellScalars,
61  vtkPointData *inPd, vtkPointData *outPd,
62  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
63  int insideOut);
64  int EvaluatePosition(double x[3], double* closestPoint,
65  int& subId, double pcoords[3],
66  double& dist2, double *weights);
67  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
68  double *weights);
70 
72  int GetParametricCenter(double pcoords[3]);
73 
74  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
75  double x[3], double pcoords[3], int& subId);
76  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
77  void Derivatives(int subId, double pcoords[3], double *values,
78  int dim, double *derivs);
79  virtual double *GetParametricCoords();
80 
82 
83  static void InterpolationFunctions(double pcoords[3], double weights[4]);
84  // Description:
85  // @deprecated Replaced by vtkPixel::InterpolateDerivs as of VTK 5.2
86  static void InterpolationDerivs(double pcoords[3], double derivs[8]);
87  // Description:
88  // Compute the interpolation functions/derivatives
89  // (aka shape functions/derivatives)
90  virtual void InterpolateFunctions(double pcoords[3], double weights[4])
91  {
92  vtkPixel::InterpolationFunctions(pcoords,weights);
93  }
94  virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
95  {
96  vtkPixel::InterpolationDerivs(pcoords,derivs);
97  }
99 
100 protected:
101  vtkPixel();
102  ~vtkPixel();
103 
105 
106 private:
107  vtkPixel(const vtkPixel&); // Not implemented.
108  void operator=(const vtkPixel&); // Not implemented.
109 };
110 
111 //----------------------------------------------------------------------------
112 inline int vtkPixel::GetParametricCenter(double pcoords[3])
113 {
114  pcoords[0] = pcoords[1] = 0.5;
115  pcoords[2] = 0.0;
116  return 0;
117 }
118 
119 #endif
120 
121 
virtual void InterpolateFunctions(double pcoords[3], double weights[4])
Definition: vtkPixel.h:90
represent and manipulate point attribute data
Definition: vtkPointData.h:35
void PrintSelf(ostream &os, vtkIndent indent)
#define VTK_FILTERING_EXPORT
virtual double * GetParametricCoords()
vtkLine * Line
Definition: vtkPixel.h:104
represent and manipulate cell attribute data
Definition: vtkCellData.h:36
a cell that represents an orthogonal quadrilateral
Definition: vtkPixel.h:38
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:49
vtkCell * GetFace(int)
Definition: vtkPixel.h:52
int vtkIdType
Definition: vtkType.h:255
static void InterpolationDerivs(double pcoords[3], double derivs[8])
int GetNumberOfFaces()
Definition: vtkPixel.h:50
cell represents a 1D line
Definition: vtkLine.h:33
abstract class to specify cell behavior
Definition: vtkCell.h:57
a simple class to control print indentation
Definition: vtkIndent.h:37
virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
Definition: vtkPixel.h:94
list of point or cell ids
Definition: vtkIdList.h:34
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:53
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:112
int GetCellDimension()
Definition: vtkPixel.h:48
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:47
object to represent cell connectivity
Definition: vtkCellArray.h:48
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])
represent and manipulate 3D points
Definition: vtkPoints.h:38