VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkBiQuadraticTriangle.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBiQuadraticTriangle.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 =========================================================================*/
40 #ifndef __vtkBiQuadraticTriangle_h
41 #define __vtkBiQuadraticTriangle_h
42 
43 #include "vtkCommonDataModelModule.h" // For export macro
44 #include "vtkNonLinearCell.h"
45 
46 class vtkQuadraticEdge;
47 class vtkTriangle;
48 class vtkDoubleArray;
49 
50 class VTKCOMMONDATAMODEL_EXPORT vtkBiQuadraticTriangle : public vtkNonLinearCell
51 {
52 public:
53  static vtkBiQuadraticTriangle *New();
54  vtkTypeMacro(vtkBiQuadraticTriangle,vtkNonLinearCell);
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
58 
61  int GetCellDimension() {return 2;}
62  int GetNumberOfEdges() {return 3;}
63  int GetNumberOfFaces() {return 0;}
64  vtkCell *GetEdge(int edgeId);
65  vtkCell *GetFace(int) {return 0;}
67 
68  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
69  void Contour(double value, vtkDataArray *cellScalars,
70  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
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 Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
80  void Derivatives(int subId, double pcoords[3], double *values,
81  int dim, double *derivs);
82  virtual double *GetParametricCoords();
83 
85 
88  void Clip(double value, vtkDataArray *cellScalars,
89  vtkIncrementalPointLocator *locator, vtkCellArray *polys,
90  vtkPointData *inPd, vtkPointData *outPd,
91  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
92  int insideOut);
94 
96 
98  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
99  double x[3], double pcoords[3], int& subId);
101 
102 
105  int GetParametricCenter(double pcoords[3]);
106 
109  double GetParametricDistance(double pcoords[3]);
110 
113  static void InterpolationFunctions(double pcoords[3], double weights[7]);
116  static void InterpolationDerivs(double pcoords[3], double derivs[14]);
118 
120  virtual void InterpolateFunctions(double pcoords[3], double weights[7])
121  {
123  }
124  virtual void InterpolateDerivs(double pcoords[3], double derivs[14])
125  {
127  }
129 
130 protected:
133 
134  vtkQuadraticEdge *Edge;
135  vtkTriangle *Face;
136  vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping
137 
138 private:
139  vtkBiQuadraticTriangle(const vtkBiQuadraticTriangle&); // Not implemented.
140  void operator=(const vtkBiQuadraticTriangle&); // Not implemented.
141 };
142 //----------------------------------------------------------------------------
143 inline int vtkBiQuadraticTriangle::GetParametricCenter(double pcoords[3])
144 {
145  pcoords[0] = pcoords[1] = 1./3;
146  pcoords[2] = 0.0;
147  return 0;
148 }
149 
150 
151 #endif
152 
153 
virtual void InterpolateDerivs(double pcoords[3], double derivs[14])
int GetParametricCenter(double pcoords[3])
represent and manipulate cell attribute data
Definition: vtkCellData.h:37
int vtkIdType
Definition: vtkType.h:268
static void InterpolationDerivs(double pcoords[3], double derivs[14])
dynamic, self-adjusting array of double
abstract class to specify cell behavior
Definition: vtkCell.h:58
a simple class to control print indentation
Definition: vtkIndent.h:38
static void InterpolationFunctions(double pcoords[3], double weights[7])
list of point or cell ids
Definition: vtkIdList.h:35
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
cell represents a parabolic, isoparametric triangle
object to represent cell connectivity
Definition: vtkCellArray.h:49
virtual void InterpolateFunctions(double pcoords[3], double weights[7])
represent and manipulate 3D points
Definition: vtkPoints.h:39