VTK
vtkQuad.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQuad.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 =========================================================================*/
30 #ifndef vtkQuad_h
31 #define vtkQuad_h
32 
33 #include "vtkCommonDataModelModule.h" // For export macro
34 #include "vtkCell.h"
35 
36 class vtkLine;
37 class vtkTriangle;
39 
41 {
42 public:
43  static vtkQuad *New();
44  vtkTypeMacro(vtkQuad,vtkCell);
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
49  int GetCellType() {return VTK_QUAD;};
50  int GetCellDimension() {return 2;};
51  int GetNumberOfEdges() {return 4;};
52  int GetNumberOfFaces() {return 0;};
53  vtkCell *GetEdge(int edgeId);
54  vtkCell *GetFace(int) {return 0;};
55  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
56  void Contour(double value, vtkDataArray *cellScalars,
58  vtkCellArray *lines, vtkCellArray *polys,
59  vtkPointData *inPd, vtkPointData *outPd,
60  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
61  int EvaluatePosition(double x[3], double* closestPoint,
62  int& subId, double pcoords[3],
63  double& dist2, double *weights);
64  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
65  double *weights);
66  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
67  double x[3], double pcoords[3], int& subId);
68  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
69  void Derivatives(int subId, double pcoords[3], double *values,
70  int dim, double *derivs);
71  virtual double *GetParametricCoords();
73 
75  int GetParametricCenter(double pcoords[3]);
76 
78 
80  void Clip(double value, vtkDataArray *cellScalars,
82  vtkPointData *inPd, vtkPointData *outPd,
83  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
84  int insideOut);
86 
88  static void InterpolationFunctions(double pcoords[3], double sf[4]);
90  static void InterpolationDerivs(double pcoords[3], double derivs[8]);
92 
94  virtual void InterpolateFunctions(double pcoords[3], double sf[4])
95  {
97  }
98  virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
99  {
100  vtkQuad::InterpolationDerivs(pcoords,derivs);
101  }
103 
106  int *GetEdgeArray(int edgeId);
107 
108 protected:
109  vtkQuad();
110  ~vtkQuad();
111 
114 
115 private:
116  vtkQuad(const vtkQuad&); // Not implemented.
117  void operator=(const vtkQuad&); // Not implemented.
118 };
119 //----------------------------------------------------------------------------
120 inline int vtkQuad::GetParametricCenter(double pcoords[3])
121 {
122  pcoords[0] = pcoords[1] = 0.5;
123  pcoords[2] = 0.0;
124  return 0;
125 }
126 
127 
128 #endif
129 
130 
int GetCellDimension()
Definition: vtkQuad.h:50
vtkCell * GetFace(int)
Definition: vtkQuad.h:54
represent and manipulate point attribute data
Definition: vtkPointData.h:36
int GetParametricCenter(double pcoords[3])
Definition: vtkQuad.h:120
void PrintSelf(ostream &os, vtkIndent indent)
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:247
static void InterpolationFunctions(double pcoords[3], double sf[4])
int GetNumberOfFaces()
Definition: vtkQuad.h:52
cell represents a 1D line
Definition: vtkLine.h:34
abstract class to specify cell behavior
Definition: vtkCell.h:58
a simple class to control print indentation
Definition: vtkIndent.h:38
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
static void InterpolationDerivs(double pcoords[3], double derivs[8])
virtual void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)=0
virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
Definition: vtkQuad.h:98
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
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
vtkLine * Line
Definition: vtkQuad.h:112
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
static vtkObject * New()
int GetNumberOfEdges()
Definition: vtkQuad.h:51
virtual int GetParametricCenter(double pcoords[3])
int GetCellType()
Definition: vtkQuad.h:49
virtual void InterpolateFunctions(double pcoords[3], double sf[4])
Definition: vtkQuad.h:94
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points
Definition: vtkPoints.h:38
vtkTriangle * Triangle
Definition: vtkQuad.h:113