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 "vtkCommonDataModelModule.h" // For export macro
45 #include "vtkNonLinearCell.h"
46 
47 class vtkQuadraticEdge;
48 class vtkLine;
51 class vtkWedge;
52 class vtkDoubleArray;
53 
55 {
56 public:
59  void PrintSelf (ostream & os, vtkIndent indent);
60 
62 
65  int GetCellDimension () { return 3; }
66  int GetNumberOfEdges () { return 9; }
67  int GetNumberOfFaces () { return 5; }
68  vtkCell *GetEdge (int edgeId);
69  vtkCell *GetFace (int faceId);
71 
72  int CellBoundary (int subId, double pcoords[3], vtkIdList * pts);
73 
75 
77  void Contour (double value, vtkDataArray * cellScalars,
78  vtkIncrementalPointLocator * locator, vtkCellArray * verts,
79  vtkCellArray * lines, vtkCellArray * polys,
80  vtkPointData * inPd, vtkPointData * outPd, vtkCellData * inCd,
81  vtkIdType cellId, vtkCellData * outCd);
82  int EvaluatePosition (double x[3], double *closestPoint,
83  int &subId, double pcoords[3], double &dist2, double *weights);
84  void EvaluateLocation (int &subId, double pcoords[3], double x[3], double *weights);
85  int Triangulate (int index, vtkIdList * ptIds, vtkPoints * pts);
86  void Derivatives (int subId, double pcoords[3], double *values, int dim, double *derivs);
87  virtual double *GetParametricCoords ();
89 
91 
94  void Clip (double value, vtkDataArray * cellScalars,
95  vtkIncrementalPointLocator * locator, vtkCellArray * tetras,
96  vtkPointData * inPd, vtkPointData * outPd,
97  vtkCellData * inCd, vtkIdType cellId, vtkCellData * outCd, int insideOut);
99 
101 
103  int IntersectWithLine (double p1[3], double p2[3], double tol, double &t,
104  double x[3], double pcoords[3], int &subId);
106 
109  int GetParametricCenter (double pcoords[3]);
110 
113  static void InterpolationFunctions (double pcoords[3], double weights[15]);
116  static void InterpolationDerivs (double pcoords[3], double derivs[45]);
118 
120  virtual void InterpolateFunctions (double pcoords[3], double weights[15])
121  {
123  }
124  virtual void InterpolateDerivs (double pcoords[3], double derivs[45])
125  {
127  }
129 
130 
132  static int *GetEdgeArray(int edgeId);
133  static int *GetFaceArray(int faceId);
135 
139  void JacobianInverse (double pcoords[3], double **inverse, double derivs[45]);
140 
141 protected:
144 
150  vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping
151 
152 private:
153  vtkQuadraticLinearWedge (const vtkQuadraticLinearWedge &); // Not implemented.
154  void operator = (const vtkQuadraticLinearWedge &); // Not implemented.
155 };
156 //----------------------------------------------------------------------------
157 // Return the center of the quadratic wedge in parametric coordinates.
158 inline int vtkQuadraticLinearWedge::GetParametricCenter(double pcoords[3])
159 {
160  pcoords[0] = pcoords[1] = 1./3;
161  pcoords[2] = 0.5;
162  return 0;
163 }
164 
165 
166 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkQuadraticLinearWedge::JacobianInverse
void JacobianInverse(double pcoords[3], double **inverse, double derivs[45])
VTK_QUADRATIC_LINEAR_WEDGE
@ VTK_QUADRATIC_LINEAR_WEDGE
Definition: vtkCellType.h:74
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
vtkQuadraticLinearWedge::GetParametricCenter
int GetParametricCenter(double pcoords[3])
Definition: vtkQuadraticLinearWedge.h:158
vtkQuadraticLinearWedge::InterpolationFunctions
static void InterpolationFunctions(double pcoords[3], double weights[15])
vtkQuadraticLinearWedge::InterpolationDerivs
static void InterpolationDerivs(double pcoords[3], double derivs[45])
vtkQuadraticLinearWedge::New
static vtkQuadraticLinearWedge * New()
vtkQuadraticLinearWedge::Clip
void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *tetras, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkQuadraticTriangle
cell represents a parabolic, isoparametric triangle
Definition: vtkQuadraticTriangle.h:46
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkQuadraticLinearWedge::GetFace
vtkCell * GetFace(int faceId)
vtkQuadraticLinearWedge::EvaluatePosition
int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)
vtkLine
cell represents a 1D line
Definition: vtkLine.h:35
vtkQuadraticLinearWedge::InterpolateDerivs
virtual void InterpolateDerivs(double pcoords[3], double derivs[45])
Definition: vtkQuadraticLinearWedge.h:124
vtkQuadraticLinearWedge::IntersectWithLine
int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
vtkQuadraticLinearWedge::Triangulate
int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkQuadraticLinearWedge::GetEdgeArray
static int * GetEdgeArray(int edgeId)
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
vtkQuadraticLinearWedge::CellBoundary
int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)
vtkWedge
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:49
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkQuadraticLinearWedge::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkQuadraticLinearWedge::Face
vtkQuadraticLinearQuad * Face
Definition: vtkQuadraticLinearWedge.h:148
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkQuadraticLinearWedge::EvaluateLocation
void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:54
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkQuadraticLinearWedge::GetNumberOfFaces
int GetNumberOfFaces()
Definition: vtkQuadraticLinearWedge.h:67
vtkQuadraticLinearWedge
cell represents a, 12-node isoparametric wedge
Definition: vtkQuadraticLinearWedge.h:55
vtkQuadraticLinearWedge::~vtkQuadraticLinearWedge
~vtkQuadraticLinearWedge()
vtkQuadraticLinearWedge::GetNumberOfEdges
int GetNumberOfEdges()
Definition: vtkQuadraticLinearWedge.h:66
vtkQuadraticLinearWedge::Scalars
vtkDoubleArray * Scalars
Definition: vtkQuadraticLinearWedge.h:150
vtkQuadraticLinearWedge::Contour
void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd)
vtkQuadraticLinearWedge::QuadEdge
vtkQuadraticEdge * QuadEdge
Definition: vtkQuadraticLinearWedge.h:145
vtkQuadraticLinearWedge::Derivatives
void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)
vtkNonLinearCell.h
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkgl::t
GLdouble GLdouble t
Definition: vtkgl.h:11602
vtkNonLinearCell
abstract superclass for non-linear cells
Definition: vtkNonLinearCell.h:36
vtkQuadraticLinearWedge::GetFaceArray
static int * GetFaceArray(int faceId)
vtkQuadraticLinearQuad
cell represents a quadratic-linear, 6-node isoparametric quad
Definition: vtkQuadraticLinearQuad.h:50
vtkQuadraticLinearWedge::TriangleFace
vtkQuadraticTriangle * TriangleFace
Definition: vtkQuadraticLinearWedge.h:147
vtkQuadraticLinearWedge::GetCellType
int GetCellType()
Definition: vtkQuadraticLinearWedge.h:64
vtkQuadraticLinearWedge::Edge
vtkLine * Edge
Definition: vtkQuadraticLinearWedge.h:146
vtkQuadraticLinearWedge::GetEdge
vtkCell * GetEdge(int edgeId)
vtkCell::GetParametricCenter
virtual int GetParametricCenter(double pcoords[3])
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:49
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkQuadraticLinearWedge::GetCellDimension
int GetCellDimension()
Definition: vtkQuadraticLinearWedge.h:65
vtkQuadraticEdge
cell represents a parabolic, isoparametric edge
Definition: vtkQuadraticEdge.h:43
vtkQuadraticLinearWedge::Wedge
vtkWedge * Wedge
Definition: vtkQuadraticLinearWedge.h:149
vtkQuadraticLinearWedge::GetParametricCoords
virtual double * GetParametricCoords()
vtkQuadraticLinearWedge::InterpolateFunctions
virtual void InterpolateFunctions(double pcoords[3], double weights[15])
Definition: vtkQuadraticLinearWedge.h:120
vtkQuadraticLinearWedge::vtkQuadraticLinearWedge
vtkQuadraticLinearWedge()