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 "vtkCell3D.h"
40 
41 class vtkLine;
42 class vtkTriangle;
43 class vtkQuad;
46 
48 {
49 public:
50  static vtkWedge *New();
51  vtkTypeMacro(vtkWedge,vtkCell3D);
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
55 
56  virtual void GetEdgePoints(int edgeId, int* &pts);
57  virtual void GetFacePoints(int faceId, int* &pts);
59 
61 
62  int GetCellType() {return VTK_WEDGE;}
63  int GetCellDimension() {return 3;}
64  int GetNumberOfEdges() {return 9;}
65  int GetNumberOfFaces() {return 5;}
66  vtkCell *GetEdge(int edgeId);
67  vtkCell *GetFace(int faceId);
68  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
69  void Contour(double value, vtkDataArray *cellScalars,
71  vtkCellArray *lines, vtkCellArray *polys,
72  vtkPointData *inPd, vtkPointData *outPd,
73  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
74  int EvaluatePosition(double x[3], double* closestPoint,
75  int& subId, double pcoords[3],
76  double& dist2, double *weights);
77  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
78  double *weights);
79  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
80  double x[3], double pcoords[3], int& subId);
81  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
82  void Derivatives(int subId, double pcoords[3], double *values,
83  int dim, double *derivs);
84  virtual double *GetParametricCoords();
86 
88  int GetParametricCenter(double pcoords[3]);
89 
91 
92  static void InterpolationFunctions(double pcoords[3], double weights[6]);
93  // Description:
94  // @deprecated Replaced by vtkWedge::InterpolateDerivs as of VTK 5.2
95  static void InterpolationDerivs(double pcoords[3], double derivs[18]);
96  // Description:
97  // Compute the interpolation functions/derivatives
98  // (aka shape functions/derivatives)
99  virtual void InterpolateFunctions(double pcoords[3], double weights[6])
100  {
101  vtkWedge::InterpolationFunctions(pcoords,weights);
102  }
103  virtual void InterpolateDerivs(double pcoords[3], double derivs[18])
104  {
105  vtkWedge::InterpolationDerivs(pcoords,derivs);
106  }
107  int JacobianInverse(double pcoords[3], double **inverse, double derivs[18]);
109 
111 
113  static int *GetEdgeArray(int edgeId);
114  static int *GetFaceArray(int faceId);
116 
117 protected:
118  vtkWedge();
119  ~vtkWedge();
120 
124 
125 private:
126  vtkWedge(const vtkWedge&); // Not implemented.
127  void operator=(const vtkWedge&); // Not implemented.
128 };
129 
130 inline int vtkWedge::GetParametricCenter(double pcoords[3])
131 {
132  pcoords[0] = pcoords[1] = 0.333333;
133  pcoords[2] = 0.5;
134  return 0;
135 }
136 
137 #endif
138 
139 
140 
represent and manipulate point attribute data
Definition: vtkPointData.h:35
#define VTK_FILTERING_EXPORT
virtual double * GetParametricCoords()
represent and manipulate cell attribute data
Definition: vtkCellData.h:36
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:39
int vtkIdType
Definition: vtkType.h:255
int GetParametricCenter(double pcoords[3])
Definition: vtkWedge.h:130
virtual void InterpolateDerivs(double pcoords[3], double derivs[18])
Definition: vtkWedge.h:103
int GetNumberOfFaces()
Definition: vtkWedge.h:65
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:36
virtual void InterpolateFunctions(double pcoords[3], double weights[6])
Definition: vtkWedge.h:99
cell represents a 1D line
Definition: vtkLine.h:33
abstract class to specify cell behavior
Definition: vtkCell.h:57
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:37
list of point or cell ids
Definition: vtkIdList.h:34
int GetCellDimension()
Definition: vtkWedge.h:63
int GetNumberOfEdges()
Definition: vtkWedge.h:64
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:53
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:121
vtkQuad * Quad
Definition: vtkWedge.h:123
virtual vtkCell * GetFace(int faceId)=0
object to represent cell connectivity
Definition: vtkCellArray.h:48
virtual vtkCell * GetEdge(int edgeId)=0
a cell that represents a triangle
Definition: vtkTriangle.h:39
int GetCellType()
Definition: vtkWedge.h:62
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:122
virtual void GetEdgePoints(int edgeId, int *&pts)=0
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:47
represent and manipulate 3D points
Definition: vtkPoints.h:38