VTK
vtkQuadraticEdge.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQuadraticEdge.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 =========================================================================*/
33 #ifndef __vtkQuadraticEdge_h
34 #define __vtkQuadraticEdge_h
35 
36 #include "vtkNonLinearCell.h"
37 
38 class vtkLine;
39 class vtkDoubleArray;
40 
42 {
43 public:
44  static vtkQuadraticEdge *New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49 
52  int GetCellDimension() {return 1;}
53  int GetNumberOfEdges() {return 0;}
54  int GetNumberOfFaces() {return 0;}
55  vtkCell *GetEdge(int) {return 0;}
56  vtkCell *GetFace(int) {return 0;}
58 
59  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
60  void Contour(double value, vtkDataArray *cellScalars,
62  vtkCellArray *lines, vtkCellArray *polys,
63  vtkPointData *inPd, vtkPointData *outPd,
64  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
65  int EvaluatePosition(double x[3], double* closestPoint,
66  int& subId, double pcoords[3],
67  double& dist2, double *weights);
68  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
69  double *weights);
70  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
71  void Derivatives(int subId, double pcoords[3], double *values,
72  int dim, double *derivs);
73  virtual double *GetParametricCoords();
74 
76 
78  void Clip(double value, vtkDataArray *cellScalars,
80  vtkPointData *inPd, vtkPointData *outPd,
81  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
82  int insideOut);
84 
86 
88  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
89  double x[3], double pcoords[3], int& subId);
91 
93  int GetParametricCenter(double pcoords[3]);
94 
96 
98  static void InterpolationFunctions(double pcoords[3], double weights[3]);
99  // Description:
100  // @deprecated Replaced by vtkQuadraticEdge::InterpolateDerivs as of VTK 5.2
101  static void InterpolationDerivs(double pcoords[3], double derivs[3]);
102  // Description:
103  // Compute the interpolation functions/derivatives
104  // (aka shape functions/derivatives)
105  virtual void InterpolateFunctions(double pcoords[3], double weights[3])
106  {
108  }
109  virtual void InterpolateDerivs(double pcoords[3], double derivs[3])
110  {
112  }
114 
115 protected:
117  ~vtkQuadraticEdge();
118 
120  vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping
121 
122 private:
123  vtkQuadraticEdge(const vtkQuadraticEdge&); // Not implemented.
124  void operator=(const vtkQuadraticEdge&); // Not implemented.
125 };
126 //----------------------------------------------------------------------------
127 inline int vtkQuadraticEdge::GetParametricCenter(double pcoords[3])
128 {
129  pcoords[0] = 0.5;
130  pcoords[1] = pcoords[2] = 0.;
131  return 0;
132 }
133 
134 #endif
135 
136 
vtkDoubleArray * Scalars
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
int GetParametricCenter(double pcoords[3])
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
abstract superclass for non-linear cells
virtual void InterpolateDerivs(double pcoords[3], double derivs[3])
int vtkIdType
Definition: vtkType.h:255
virtual void InterpolateFunctions(double pcoords[3], double weights[3])
static void InterpolationDerivs(double pcoords[3], double derivs[3])
dynamic, self-adjusting array of double
cell represents a 1D line
Definition: vtkLine.h:33
abstract class to specify cell behavior
Definition: vtkCell.h:57
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
vtkCell * GetEdge(int)
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: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 Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)=0
void PrintSelf(ostream &os, vtkIndent indent)
vtkCell * GetFace(int)
object to represent cell connectivity
Definition: vtkCellArray.h:48
cell represents a parabolic, isoparametric edge
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
static void InterpolationFunctions(double pcoords[3], double weights[3])
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
static vtkObject * New()
virtual int GetParametricCenter(double pcoords[3])
represent and manipulate 3D points
Definition: vtkPoints.h:38