VTK
vtkWedge.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWedge.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 vtkWedge_h
37 #define vtkWedge_h
38 
39 #include "vtkCommonDataModelModule.h" // For export macro
40 #include "vtkCell3D.h"
41 
42 class vtkLine;
43 class vtkTriangle;
44 class vtkQuad;
47 
49 {
50 public:
51  static vtkWedge *New();
52  vtkTypeMacro(vtkWedge,vtkCell3D);
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
56 
57  virtual void GetEdgePoints(int edgeId, int* &pts);
58  virtual void GetFacePoints(int faceId, int* &pts);
60 
62 
63  int GetCellType() {return VTK_WEDGE;}
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);
69  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
70  void Contour(double value, vtkDataArray *cellScalars,
72  vtkCellArray *lines, vtkCellArray *polys,
73  vtkPointData *inPd, vtkPointData *outPd,
74  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
75  int EvaluatePosition(double x[3], double* closestPoint,
76  int& subId, double pcoords[3],
77  double& dist2, double *weights);
78  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
79  double *weights);
80  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
81  double x[3], double pcoords[3], int& subId);
82  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
83  void Derivatives(int subId, double pcoords[3], double *values,
84  int dim, double *derivs);
85  virtual double *GetParametricCoords();
87 
89  int GetParametricCenter(double pcoords[3]);
90 
92  static void InterpolationFunctions(double pcoords[3], double weights[6]);
94  static void InterpolationDerivs(double pcoords[3], double derivs[18]);
96 
98  virtual void InterpolateFunctions(double pcoords[3], double weights[6])
99  {
100  vtkWedge::InterpolationFunctions(pcoords,weights);
101  }
102  virtual void InterpolateDerivs(double pcoords[3], double derivs[18])
103  {
104  vtkWedge::InterpolationDerivs(pcoords,derivs);
105  }
106  int JacobianInverse(double pcoords[3], double **inverse, double derivs[18]);
108 
110 
112  static int *GetEdgeArray(int edgeId);
113  static int *GetFaceArray(int faceId);
115 
116 protected:
117  vtkWedge();
118  ~vtkWedge();
119 
123 
124 private:
125  vtkWedge(const vtkWedge&); // Not implemented.
126  void operator=(const vtkWedge&); // Not implemented.
127 };
128 
129 inline int vtkWedge::GetParametricCenter(double pcoords[3])
130 {
131  pcoords[0] = pcoords[1] = 0.333333;
132  pcoords[2] = 0.5;
133  return 0;
134 }
135 
136 #endif
137 
138 
139 
represent and manipulate point attribute data
Definition: vtkPointData.h:36
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
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:40
int vtkIdType
Definition: vtkType.h:275
int GetParametricCenter(double pcoords[3])
Definition: vtkWedge.h:129
virtual void InterpolateDerivs(double pcoords[3], double derivs[18])
Definition: vtkWedge.h:102
int GetNumberOfFaces()
Definition: vtkWedge.h:66
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:37
virtual void InterpolateFunctions(double pcoords[3], double weights[6])
Definition: vtkWedge.h:98
cell represents a 1D line
Definition: vtkLine.h:34
abstract class to specify cell behavior
Definition: vtkCell.h:61
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)
static void InterpolationDerivs(double pcoords[3], double derivs[18])
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
int GetCellDimension()
Definition: vtkWedge.h:64
int GetNumberOfEdges()
Definition: vtkWedge.h:65
virtual void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)=0
dataset represents arbitrary combinations of all possible cell types
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 GetFacePoints(int faceId, int *&pts)=0
void PrintSelf(ostream &os, vtkIndent indent)
static void InterpolationFunctions(double pcoords[3], double weights[6])
vtkLine * Line
Definition: vtkWedge.h:120
vtkQuad * Quad
Definition: vtkWedge.h:122
virtual vtkCell * GetFace(int faceId)=0
object to represent cell connectivity
Definition: vtkCellArray.h:49
virtual vtkCell * GetEdge(int edgeId)=0
a cell that represents a triangle
Definition: vtkTriangle.h:40
int GetCellType()
Definition: vtkWedge.h:63
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
static vtkObject * New()
virtual int GetParametricCenter(double pcoords[3])
vtkTriangle * Triangle
Definition: vtkWedge.h:121
virtual void GetEdgePoints(int edgeId, int *&pts)=0
#define VTKCOMMONDATAMODEL_EXPORT
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:48
represent and manipulate 3D points
Definition: vtkPoints.h:38