VTK
vtkQuadraticQuad.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQuadraticQuad.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 =========================================================================*/
35 #ifndef __vtkQuadraticQuad_h
36 #define __vtkQuadraticQuad_h
37 
38 #include "vtkNonLinearCell.h"
39 
40 class vtkQuadraticEdge;
41 class vtkQuad;
42 class vtkDoubleArray;
43 
45 {
46 public:
47  static vtkQuadraticQuad *New();
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52 
55  int GetCellDimension() {return 2;}
56  int GetNumberOfEdges() {return 4;}
57  int GetNumberOfFaces() {return 0;}
58  vtkCell *GetEdge(int);
59  vtkCell *GetFace(int) {return 0;}
61 
62  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
63  void Contour(double value, vtkDataArray *cellScalars,
65  vtkCellArray *lines, vtkCellArray *polys,
66  vtkPointData *inPd, vtkPointData *outPd,
67  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
68  int EvaluatePosition(double x[3], double* closestPoint,
69  int& subId, double pcoords[3],
70  double& dist2, double *weights);
71  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
72  double *weights);
73  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
74  void Derivatives(int subId, double pcoords[3], double *values,
75  int dim, double *derivs);
76  virtual double *GetParametricCoords();
77 
79 
81  void Clip(double value, vtkDataArray *cellScalars,
83  vtkPointData *inPd, vtkPointData *outPd,
84  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
85  int insideOut);
87 
89 
91  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
92  double x[3], double pcoords[3], int& subId);
94 
95 
97  int GetParametricCenter(double pcoords[3]);
98 
100 
102  static void InterpolationFunctions(double pcoords[3], double weights[8]);
103  // Description:
104  // @deprecated Replaced by vtkQuadraticQuad::InterpolateDerivs as of VTK 5.2
105  static void InterpolationDerivs(double pcoords[3], double derivs[16]);
106  // Description:
107  // Compute the interpolation functions/derivatives
108  // (aka shape functions/derivatives)
109  virtual void InterpolateFunctions(double pcoords[3], double weights[8])
110  {
112  }
113  virtual void InterpolateDerivs(double pcoords[3], double derivs[16])
114  {
116  }
118 
119 protected:
121  ~vtkQuadraticQuad();
122 
127 
128  // In order to achieve some functionality we introduce a fake center point
129  // which require to have some extra functionalities compare to other non-linar
130  // cells
133  void Subdivide(double *weights);
134  void InterpolateAttributes(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId,
135  vtkDataArray *cellScalars);
136 
137 private:
138  vtkQuadraticQuad(const vtkQuadraticQuad&); // Not implemented.
139  void operator=(const vtkQuadraticQuad&); // Not implemented.
140 };
141 //----------------------------------------------------------------------------
142 inline int vtkQuadraticQuad::GetParametricCenter(double pcoords[3])
143 {
144  pcoords[0] = pcoords[1] = 0.5;
145  pcoords[2] = 0.;
146  return 0;
147 }
148 
149 #endif
150 
151 
represent and manipulate point attribute data
Definition: vtkPointData.h:35
static void InterpolationDerivs(double pcoords[3], double derivs[16])
#define VTK_FILTERING_EXPORT
virtual double * GetParametricCoords()
represent and manipulate cell attribute data
Definition: vtkCellData.h:36
Abstract class in support of both point location and point insertion.
virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)=0
vtkDoubleArray * CellScalars
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
abstract superclass for non-linear cells
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:39
int vtkIdType
Definition: vtkType.h:255
virtual void InterpolateFunctions(double pcoords[3], double weights[8])
dynamic, self-adjusting array of double
vtkPointData * PointData
vtkQuadraticEdge * Edge
abstract class to specify cell behavior
Definition: vtkCell.h:57
cell represents a parabolic, 8-node isoparametric quad
a simple class to control print indentation
Definition: vtkIndent.h:37
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
vtkCell * GetFace(int)
virtual void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)=0
void PrintSelf(ostream &os, vtkIndent indent)
object to represent cell connectivity
Definition: vtkCellArray.h:48
virtual vtkCell * GetEdge(int edgeId)=0
vtkDoubleArray * Scalars
virtual void InterpolateDerivs(double pcoords[3], double derivs[16])
vtkCellData * CellData
cell represents a parabolic, isoparametric edge
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
static void InterpolationFunctions(double pcoords[3], double weights[8])
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
static vtkObject * New()
virtual int GetParametricCenter(double pcoords[3])
int GetParametricCenter(double pcoords[3])
represent and manipulate 3D points
Definition: vtkPoints.h:38