VTK
vtkQuadraticWedge.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQuadraticWedge.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 =========================================================================*/
36 #ifndef vtkQuadraticWedge_h
37 #define vtkQuadraticWedge_h
38 
39 #include "vtkCommonDataModelModule.h" // For export macro
40 #include "vtkNonLinearCell.h"
41 
42 class vtkQuadraticEdge;
43 class vtkQuadraticQuad;
45 class vtkWedge;
46 class vtkDoubleArray;
47 
49 {
50 public:
51  static vtkQuadraticWedge *New();
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
56 
59  int GetCellDimension() {return 3;}
60  int GetNumberOfEdges() {return 9;}
61  int GetNumberOfFaces() {return 5;}
62  vtkCell *GetEdge(int edgeId);
63  vtkCell *GetFace(int faceId);
65 
66  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
67  void Contour(double value, vtkDataArray *cellScalars,
69  vtkCellArray *lines, vtkCellArray *polys,
70  vtkPointData *inPd, vtkPointData *outPd,
71  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
72  int EvaluatePosition(double x[3], double* closestPoint,
73  int& subId, double pcoords[3],
74  double& dist2, double *weights);
75  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
76  double *weights);
77  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
78  void Derivatives(int subId, double pcoords[3], double *values,
79  int dim, double *derivs);
80  virtual double *GetParametricCoords();
81 
83 
86  void Clip(double value, vtkDataArray *cellScalars,
87  vtkIncrementalPointLocator *locator, vtkCellArray *tetras,
88  vtkPointData *inPd, vtkPointData *outPd,
89  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
90  int insideOut);
92 
94 
96  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
97  double x[3], double pcoords[3], int& subId);
99 
100 
102  int GetParametricCenter(double pcoords[3]);
103 
106  static void InterpolationFunctions(double pcoords[3], double weights[15]);
109  static void InterpolationDerivs(double pcoords[3], double derivs[45]);
111 
113  virtual void InterpolateFunctions(double pcoords[3], double weights[15])
114  {
116  }
117  virtual void InterpolateDerivs(double pcoords[3], double derivs[45])
118  {
120  }
122 
123 
125  static int *GetEdgeArray(int edgeId);
126  static int *GetFaceArray(int faceId);
128 
132  void JacobianInverse(double pcoords[3], double **inverse, double derivs[45]);
133 
134 protected:
137 
145  vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping
146 
147  void Subdivide(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId,
148  vtkDataArray *cellScalars);
149 
150 private:
151  vtkQuadraticWedge(const vtkQuadraticWedge&); // Not implemented.
152  void operator=(const vtkQuadraticWedge&); // Not implemented.
153 };
154 //----------------------------------------------------------------------------
155 // Return the center of the quadratic wedge in parametric coordinates.
156 inline int vtkQuadraticWedge::GetParametricCenter(double pcoords[3])
157 {
158  pcoords[0] = pcoords[1] = 1./3;
159  pcoords[2] = 0.5;
160  return 0;
161 }
162 
163 
164 #endif
165 
166 
static void InterpolationDerivs(double pcoords[3], double derivs[45])
vtkPointData * PointData
vtkDoubleArray * Scalars
vtkQuadraticQuad * Face
represent and manipulate point attribute data
Definition: vtkPointData.h:36
vtkDoubleArray * CellScalars
virtual double * GetParametricCoords()
represent and manipulate cell attribute data
Definition: vtkCellData.h:37
Abstract class in support of both point location and point insertion.
virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)=0
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
int vtkIdType
Definition: vtkType.h:275
dynamic, self-adjusting array of double
abstract class to specify cell behavior
Definition: vtkCell.h:61
virtual void InterpolateDerivs(double pcoords[3], double derivs[45])
vtkQuadraticEdge * Edge
cell represents a parabolic, 8-node isoparametric quad
a simple class to control print indentation
Definition: vtkIndent.h:38
static void InterpolationFunctions(double pcoords[3], double weights[15])
list of point or cell ids
Definition: vtkIdList.h:35
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:54
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)=0
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)
vtkCellData * CellData
virtual vtkCell * GetFace(int faceId)=0
object to represent cell connectivity
Definition: vtkCellArray.h:49
virtual vtkCell * GetEdge(int edgeId)=0
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
cell represents a parabolic, isoparametric triangle
cell represents a parabolic, 15-node isoparametric wedge
vtkQuadraticTriangle * TriangleFace
int GetParametricCenter(double pcoords[3])
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
static vtkObject * New()
virtual void InterpolateFunctions(double pcoords[3], double weights[15])
virtual int GetParametricCenter(double pcoords[3])
#define VTKCOMMONDATAMODEL_EXPORT
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:48
represent and manipulate 3D points
Definition: vtkPoints.h:38