VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkBiQuadraticQuadraticWedge.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBiQuadraticQuadraticWedge.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 =========================================================================*/
43 #ifndef __vtkBiQuadraticQuadraticWedge_h
44 #define __vtkBiQuadraticQuadraticWedge_h
45 
46 #include "vtkCommonDataModelModule.h" // For export macro
47 #include "vtkNonLinearCell.h"
48 
49 class vtkQuadraticEdge;
50 class vtkBiQuadraticQuad;
51 class vtkQuadraticTriangle;
52 class vtkWedge;
53 class vtkDoubleArray;
54 
55 class VTKCOMMONDATAMODEL_EXPORT vtkBiQuadraticQuadraticWedge : public vtkNonLinearCell
56 {
57 public:
58  static vtkBiQuadraticQuadraticWedge *New ();
59  vtkTypeMacro(vtkBiQuadraticQuadraticWedge,vtkNonLinearCell);
60  void PrintSelf (ostream & os, vtkIndent indent);
61 
63 
65  int GetCellType () { return VTK_BIQUADRATIC_QUADRATIC_WEDGE; }
66  int GetCellDimension () { return 3; }
67  int GetNumberOfEdges () { return 9; }
68  int GetNumberOfFaces () { return 5; }
69  vtkCell *GetEdge (int edgeId);
70  vtkCell *GetFace (int faceId);
72 
73  int CellBoundary (int subId, double pcoords[3], vtkIdList * pts);
74  void Contour (double value, vtkDataArray * cellScalars,
75  vtkIncrementalPointLocator * locator, vtkCellArray * verts,
76  vtkCellArray * lines, vtkCellArray * polys,
77  vtkPointData * inPd, vtkPointData * outPd, vtkCellData * inCd,
78  vtkIdType cellId, vtkCellData * outCd);
79  int EvaluatePosition (double x[3], double *closestPoint,
80  int &subId, double pcoords[3], double &dist2, double *weights);
81  void EvaluateLocation (int &subId, double pcoords[3], double x[3],
82  double *weights);
83  int Triangulate (int index, vtkIdList * ptIds, vtkPoints * pts);
84  void Derivatives (int subId, double pcoords[3], double *values, int dim,
85  double *derivs);
86  virtual double *GetParametricCoords ();
87 
89 
92  void Clip (double value, vtkDataArray * cellScalars,
93  vtkIncrementalPointLocator * locator, vtkCellArray * tetras,
94  vtkPointData * inPd, vtkPointData * outPd,
95  vtkCellData * inCd, vtkIdType cellId, vtkCellData * outCd,
96  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 
106 
108  int GetParametricCenter (double pcoords[3]);
109 
112  static void InterpolationFunctions (double pcoords[3], double weights[15]);
115  static void InterpolationDerivs (double pcoords[3], double derivs[45]);
117 
119  virtual void InterpolateFunctions (double pcoords[3], double weights[15])
120  {
122  }
123  virtual void InterpolateDerivs (double pcoords[3], double derivs[45])
124  {
126  }
128 
129 
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 *Edge;
145  vtkQuadraticTriangle *TriangleFace;
146  vtkBiQuadraticQuad *Face;
147  vtkWedge *Wedge;
148  vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping
149 
150 private:
151  vtkBiQuadraticQuadraticWedge (const vtkBiQuadraticQuadraticWedge &); // Not implemented.
152  void operator = (const vtkBiQuadraticQuadraticWedge &); // Not implemented.
153 };
154 //----------------------------------------------------------------------------
155 // Return the center of the quadratic wedge in parametric coordinates.
157 {
158  pcoords[0] = pcoords[1] = 1./3;
159  pcoords[2] = 0.5;
160  return 0;
161 }
162 
163 
164 #endif
virtual void InterpolateFunctions(double pcoords[3], double weights[15])
static void InterpolationDerivs(double pcoords[3], double derivs[45])
int vtkIdType
Definition: vtkType.h:268
cell represents a parabolic, 18-node isoparametric wedge
dynamic, self-adjusting array of double
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 InterpolationFunctions(double pcoords[3], double weights[15])
virtual void InterpolateDerivs(double pcoords[3], double derivs[45])
represent and manipulate 3D points
Definition: vtkPoints.h:39