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