VTK
vtkQuad.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQuad.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 __vtkQuad_h
31 #define __vtkQuad_h
32 
33 #include "vtkCell.h"
34 
35 class vtkLine;
36 class vtkTriangle;
37 class vtkIncrementalPointLocator;
38 
39 class VTK_FILTERING_EXPORT vtkQuad : public vtkCell
40 {
41 public:
42  static vtkQuad *New();
43  vtkTypeMacro(vtkQuad,vtkCell);
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47 
48  int GetCellType() {return VTK_QUAD;};
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,
56  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
57  vtkCellArray *lines, vtkCellArray *polys,
58  vtkPointData *inPd, vtkPointData *outPd,
59  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
60  int EvaluatePosition(double x[3], double* closestPoint,
61  int& subId, double pcoords[3],
62  double& dist2, double *weights);
63  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
64  double *weights);
65  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
66  double x[3], double pcoords[3], int& subId);
67  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
68  void Derivatives(int subId, double pcoords[3], double *values,
69  int dim, double *derivs);
70  virtual double *GetParametricCoords();
72 
74  int GetParametricCenter(double pcoords[3]);
75 
77 
79  void Clip(double value, vtkDataArray *cellScalars,
80  vtkIncrementalPointLocator *locator, vtkCellArray *polys,
81  vtkPointData *inPd, vtkPointData *outPd,
82  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
83  int insideOut);
85 
87 
88  static void InterpolationFunctions(double pcoords[3], double sf[4]);
89  // Description:
90  // @deprecated Replaced by vtkQuad::InterpolateDerivs as of VTK 5.2
91  static void InterpolationDerivs(double pcoords[3], double derivs[8]);
92  // Description:
93  // Compute the interpolation functions/derivatives
94  // (aka shape functions/derivatives)
95  virtual void InterpolateFunctions(double pcoords[3], double sf[4])
96  {
98  }
99  virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
100  {
101  vtkQuad::InterpolationDerivs(pcoords,derivs);
102  }
104 
107  int *GetEdgeArray(int edgeId);
108 
109 protected:
110  vtkQuad();
111  ~vtkQuad();
112 
115 
116 private:
117  vtkQuad(const vtkQuad&); // Not implemented.
118  void operator=(const vtkQuad&); // Not implemented.
119 };
120 //----------------------------------------------------------------------------
121 inline int vtkQuad::GetParametricCenter(double pcoords[3])
122 {
123  pcoords[0] = pcoords[1] = 0.5;
124  pcoords[2] = 0.0;
125  return 0;
126 }
127 
128 
129 #endif
130 
131 
int GetCellDimension()
Definition: vtkQuad.h:49
vtkCell * GetFace(int)
Definition: vtkQuad.h:53
represent and manipulate point attribute data
Definition: vtkPointData.h:35
int GetParametricCenter(double pcoords[3])
Definition: vtkQuad.h:121
#define VTK_FILTERING_EXPORT
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:39
int vtkIdType
Definition: vtkType.h:255
static void InterpolationFunctions(double pcoords[3], double sf[4])
int GetNumberOfFaces()
Definition: vtkQuad.h:51
cell represents a 1D line
Definition: vtkLine.h:33
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
static void InterpolationDerivs(double pcoords[3], double derivs[8])
virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
Definition: vtkQuad.h:99
object to represent cell connectivity
Definition: vtkCellArray.h:48
a cell that represents a triangle
Definition: vtkTriangle.h:39
vtkLine * Line
Definition: vtkQuad.h:113
int GetNumberOfEdges()
Definition: vtkQuad.h:50
int GetCellType()
Definition: vtkQuad.h:48
virtual void InterpolateFunctions(double pcoords[3], double sf[4])
Definition: vtkQuad.h:95
represent and manipulate 3D points
Definition: vtkPoints.h:38
vtkTriangle * Triangle
Definition: vtkQuad.h:114