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 
109 
111  static void InterpolationFunctions (double pcoords[3], double weights[9]);
112  // Description:
113  // @deprecated Replaced by vtkBiQuadraticQuad::InterpolateDerivs as of VTK 5.2
114  static void InterpolationDerivs (double pcoords[3], double derivs[18]);
115  // Description:
116  // Compute the interpolation functions/derivatives
117  // (aka shape functions/derivatives)
118  virtual void InterpolateFunctions (double pcoords[3], double weights[9])
119  {
121  }
122  virtual void InterpolateDerivs (double pcoords[3], double derivs[18])
123  {
125  }
127 
128 protected:
131 
132  vtkQuadraticEdge *Edge;
136 
137 private:
138  vtkBiQuadraticQuad(const vtkBiQuadraticQuad&); // Not implemented.
139  void operator=(const vtkBiQuadraticQuad&); // Not implemented.
140 };
141 //----------------------------------------------------------------------------
142 inline int vtkBiQuadraticQuad::GetParametricCenter(double pcoords[3])
143 {
144  pcoords[0] = pcoords[1] = 0.5;
145  pcoords[2] = 0.;
146  return 0;
147 }
148 
149 #endif
represent and manipulate point attribute data
Definition: vtkPointData.h:35
#define VTK_FILTERING_EXPORT
cell represents a parabolic, 9-node isoparametric quad
vtkCell * GetFace(int)
static void InterpolationDerivs(double pcoords[3], double derivs[18])
abstract superclass for non-linear cells
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:39
int vtkIdType
Definition: vtkType.h:255
int GetParametricCenter(double pcoords[3])
dynamic, self-adjusting array of double
virtual void InterpolateFunctions(double pcoords[3], double weights[9])
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
vtkQuadraticEdge * Edge
void PrintSelf(ostream &os, vtkIndent indent)
object to represent cell connectivity
Definition: vtkCellArray.h:48
a cell that represents a triangle
Definition: vtkTriangle.h:39
static void InterpolationFunctions(double pcoords[3], double weights[9])
virtual void InterpolateDerivs(double pcoords[3], double derivs[18])
vtkDoubleArray * Scalars
represent and manipulate 3D points
Definition: vtkPoints.h:38