VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "vtkCommonDataModelModule.h" // For export macro
34 #include "vtkCell.h"
35 
36 class vtkLine;
37 class vtkTriangle;
39 
40 class VTKCOMMONDATAMODEL_EXPORT vtkQuad : public vtkCell
41 {
42 public:
43  static vtkQuad *New();
44  vtkTypeMacro(vtkQuad,vtkCell);
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
49  int GetCellType() {return VTK_QUAD;};
50  int GetCellDimension() {return 2;};
51  int GetNumberOfEdges() {return 4;};
52  int GetNumberOfFaces() {return 0;};
53  vtkCell *GetEdge(int edgeId);
54  vtkCell *GetFace(int) {return 0;};
55  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
56  void Contour(double value, vtkDataArray *cellScalars,
57  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
58  vtkCellArray *lines, vtkCellArray *polys,
59  vtkPointData *inPd, vtkPointData *outPd,
60  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
61  int EvaluatePosition(double x[3], double* closestPoint,
62  int& subId, double pcoords[3],
63  double& dist2, double *weights);
64  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
65  double *weights);
66  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
67  double x[3], double pcoords[3], int& subId);
68  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
69  void Derivatives(int subId, double pcoords[3], double *values,
70  int dim, double *derivs);
71  virtual double *GetParametricCoords();
73 
75  int GetParametricCenter(double pcoords[3]);
76 
78 
80  void Clip(double value, vtkDataArray *cellScalars,
81  vtkIncrementalPointLocator *locator, vtkCellArray *polys,
82  vtkPointData *inPd, vtkPointData *outPd,
83  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
84  int insideOut);
86 
88  static void InterpolationFunctions(double pcoords[3], double sf[4]);
90  static void InterpolationDerivs(double pcoords[3], double derivs[8]);
92 
94  virtual void InterpolateFunctions(double pcoords[3], double sf[4])
95  {
97  }
98  virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
99  {
100  vtkQuad::InterpolationDerivs(pcoords,derivs);
101  }
103 
106  int *GetEdgeArray(int edgeId);
107 
108 protected:
109  vtkQuad();
110  ~vtkQuad();
111 
113  vtkTriangle *Triangle;
114 
115 private:
116  vtkQuad(const vtkQuad&); // Not implemented.
117  void operator=(const vtkQuad&); // Not implemented.
118 };
119 //----------------------------------------------------------------------------
120 inline int vtkQuad::GetParametricCenter(double pcoords[3])
121 {
122  pcoords[0] = pcoords[1] = 0.5;
123  pcoords[2] = 0.0;
124  return 0;
125 }
126 
127 
128 #endif
129 
130 
int GetCellDimension()
Definition: vtkQuad.h:50
vtkCell * GetFace(int)
Definition: vtkQuad.h:54
int GetParametricCenter(double pcoords[3])
Definition: vtkQuad.h:120
Abstract class in support of both point location and point insertion.
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:40
int vtkIdType
Definition: vtkType.h:268
static void InterpolationFunctions(double pcoords[3], double sf[4])
int GetNumberOfFaces()
Definition: vtkQuad.h:52
cell represents a 1D line
Definition: vtkLine.h:34
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
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:98
vtkLine * Line
Definition: vtkQuad.h:112
int GetNumberOfEdges()
Definition: vtkQuad.h:51
int GetCellType()
Definition: vtkQuad.h:49
virtual void InterpolateFunctions(double pcoords[3], double sf[4])
Definition: vtkQuad.h:94
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkTriangle * Triangle
Definition: vtkQuad.h:113