VTK
vtkBiQuadraticQuad.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBiQuadraticQuad.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 =========================================================================*/
42 #ifndef __vtkBiQuadraticQuad_h
43 #define __vtkBiQuadraticQuad_h
44 
45 #include "vtkNonLinearCell.h"
46 
47 class vtkQuadraticEdge;
48 class vtkQuad;
49 class vtkTriangle;
50 class vtkDoubleArray;
51 
53 {
54 public:
55  static vtkBiQuadraticQuad *New ();
57  void PrintSelf (ostream & os, vtkIndent indent);
58 
60 
62  int GetCellType () { return VTK_BIQUADRATIC_QUAD; }
63  int GetCellDimension () { return 2; }
64  int GetNumberOfEdges () { return 4; }
65  int GetNumberOfFaces () { return 0; }
66  vtkCell *GetEdge (int);
67  vtkCell *GetFace (int) { return 0; }
69 
70  int CellBoundary (int subId, double pcoords[3], vtkIdList * pts);
71  int EvaluatePosition (double x[3], double *closestPoint,
72  int &subId, double pcoords[3],
73  double &dist2, double *weights);
74  void EvaluateLocation (int &subId, double pcoords[3], double x[3],
75  double *weights);
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 
81  void Contour (double value, vtkDataArray * cellScalars,
82  vtkIncrementalPointLocator * locator, vtkCellArray * verts,
83  vtkCellArray * lines, vtkCellArray * polys,
84  vtkPointData * inPd, vtkPointData * outPd, vtkCellData * inCd,
85  vtkIdType cellId, vtkCellData * outCd);
86 
88 
91  void Clip (double value, vtkDataArray * cellScalars,
92  vtkIncrementalPointLocator * locator, vtkCellArray * polys,
93  vtkPointData * inPd, vtkPointData * outPd,
94  vtkCellData * inCd, vtkIdType cellId, vtkCellData * outCd,
95  int insideOut);
97 
99 
101  int IntersectWithLine (double p1[3], double p2[3], double tol, double &t,
102  double x[3], double pcoords[3], int &subId);
104 
106  int GetParametricCenter(double pcoords[3]);
107 
110  static void InterpolationFunctions (double pcoords[3], double weights[9]);
113  static void InterpolationDerivs (double pcoords[3], double derivs[18]);
115 
117  virtual void InterpolateFunctions (double pcoords[3], double weights[9])
118  {
120  }
121  virtual void InterpolateDerivs (double pcoords[3], double derivs[18])
122  {
124  }
126 
127 protected:
130 
135 
136 private:
137  vtkBiQuadraticQuad(const vtkBiQuadraticQuad&); // Not implemented.
138  void operator=(const vtkBiQuadraticQuad&); // Not implemented.
139 };
140 //----------------------------------------------------------------------------
141 inline int vtkBiQuadraticQuad::GetParametricCenter(double pcoords[3])
142 {
143  pcoords[0] = pcoords[1] = 0.5;
144  pcoords[2] = 0.;
145  return 0;
146 }
147 
148 #endif