VTK
vtkQuadraticLinearWedge.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQuadraticLinearWedge.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 =========================================================================*/
41 #ifndef __vtkQuadraticLinearWedge_h
42 #define __vtkQuadraticLinearWedge_h
43 
44 #include "vtkNonLinearCell.h"
45 
46 class vtkQuadraticEdge;
47 class vtkLine;
48 class vtkQuadraticLinearQuad;
49 class vtkQuadraticTriangle;
50 class vtkWedge;
51 class vtkDoubleArray;
52 
54 {
55 public:
56  static vtkQuadraticLinearWedge *New ();
58  void PrintSelf (ostream & os, vtkIndent indent);
59 
61 
64  int GetCellDimension () { return 3; }
65  int GetNumberOfEdges () { return 9; }
66  int GetNumberOfFaces () { return 5; }
67  vtkCell *GetEdge (int edgeId);
68  vtkCell *GetFace (int faceId);
70 
71  int CellBoundary (int subId, double pcoords[3], vtkIdList * pts);
72 
74 
76  void Contour (double value, vtkDataArray * cellScalars,
77  vtkIncrementalPointLocator * locator, vtkCellArray * verts,
78  vtkCellArray * lines, vtkCellArray * polys,
79  vtkPointData * inPd, vtkPointData * outPd, vtkCellData * inCd,
80  vtkIdType cellId, vtkCellData * outCd);
81  int EvaluatePosition (double x[3], double *closestPoint,
82  int &subId, double pcoords[3], double &dist2, double *weights);
83  void EvaluateLocation (int &subId, double pcoords[3], double x[3], double *weights);
84  int Triangulate (int index, vtkIdList * ptIds, vtkPoints * pts);
85  void Derivatives (int subId, double pcoords[3], double *values, int dim, double *derivs);
86  virtual double *GetParametricCoords ();
88 
90 
93  void Clip (double value, vtkDataArray * cellScalars,
94  vtkIncrementalPointLocator * locator, vtkCellArray * tetras,
95  vtkPointData * inPd, vtkPointData * outPd,
96  vtkCellData * inCd, vtkIdType cellId, vtkCellData * outCd, int insideOut);
98 
100 
102  int IntersectWithLine (double p1[3], double p2[3], double tol, double &t,
103  double x[3], double pcoords[3], int &subId);
105 
108  int GetParametricCenter (double pcoords[3]);
109 
111 
113  static void InterpolationFunctions (double pcoords[3], double weights[15]);
114  // Description:
115  // @deprecated Replaced by vtkQuadraticLinearWedge::InterpolateDerivs as of VTK 5.2
116  static void InterpolationDerivs (double pcoords[3], double derivs[45]);
117  // Description:
118  // Compute the interpolation functions/derivatives
119  // (aka shape functions/derivatives)
120  virtual void InterpolateFunctions (double pcoords[3], double weights[15])
121  {
123  }
124  virtual void InterpolateDerivs (double pcoords[3], double derivs[45])
125  {
127  }
128  // Description:
129  // Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
130  // Ids are related to the cell, not to the dataset.
131  static int *GetEdgeArray(int edgeId);
132  static int *GetFaceArray(int faceId);
134 
138  void JacobianInverse (double pcoords[3], double **inverse, double derivs[45]);
139 
140 protected:
143 
144  vtkQuadraticEdge *QuadEdge;
146  vtkQuadraticTriangle *TriangleFace;
147  vtkQuadraticLinearQuad *Face;
148  vtkWedge *Wedge;
149  vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping
150 
151 private:
152  vtkQuadraticLinearWedge (const vtkQuadraticLinearWedge &); // Not implemented.
153  void operator = (const vtkQuadraticLinearWedge &); // Not implemented.
154 };
155 //----------------------------------------------------------------------------
156 // Return the center of the quadratic wedge in parametric coordinates.
157 inline int vtkQuadraticLinearWedge::GetParametricCenter(double pcoords[3])
158 {
159  pcoords[0] = pcoords[1] = 1./3;
160  pcoords[2] = 0.5;
161  return 0;
162 }
163 
164 
165 #endif
int GetParametricCenter(double pcoords[3])
represent and manipulate point attribute data
Definition: vtkPointData.h:35
#define VTK_FILTERING_EXPORT
abstract superclass for non-linear cells
int vtkIdType
Definition: vtkType.h:255
static void InterpolationFunctions(double pcoords[3], double weights[15])
virtual void InterpolateDerivs(double pcoords[3], double derivs[45])
static void InterpolationDerivs(double pcoords[3], double derivs[45])
dynamic, self-adjusting array of double
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
void PrintSelf(ostream &os, vtkIndent indent)
vtkQuadraticLinearQuad * Face
object to represent cell connectivity
Definition: vtkCellArray.h:48
vtkQuadraticTriangle * TriangleFace
virtual void InterpolateFunctions(double pcoords[3], double weights[15])
cell represents a, 12-node isoparametric wedge
represent and manipulate 3D points
Definition: vtkPoints.h:38