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 "vtkCommonDataModelModule.h" // For export macro
39 #include "vtkNonLinearCell.h"
40 
41 class vtkLine;
42 class vtkDoubleArray;
43 
45 {
46 public:
47  static vtkCubicLine *New();
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52 
53  int GetCellType() {return VTK_CUBIC_LINE;};
54  int GetCellDimension() {return 1;};
55  int GetNumberOfEdges() {return 0;};
56  int GetNumberOfFaces() {return 0;};
57  vtkCell *GetEdge(int) {return 0;};
58  vtkCell *GetFace(int) {return 0;};
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();
75 
78  double GetParametricDistance(double pcoords[3]);
79 
81 
83  void Clip(double value, vtkDataArray *cellScalars,
85  vtkPointData *inPd, vtkPointData *outPd,
86  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
87  int insideOut);
89 
91  int GetParametricCenter(double pcoords[3]);
92 
94 
96  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
97  double x[3], double pcoords[3], int& subId);
99 
100 
101 
104  static void InterpolationFunctions(double pcoords[3], double weights[4]);
106  static void InterpolationDerivs(double pcoords[3], double derivs[4]);
108 
110  virtual void InterpolateFunctions(double pcoords[3], double weights[4])
111  {
112  vtkCubicLine::InterpolationFunctions(pcoords,weights);
113  }
114  virtual void InterpolateDerivs(double pcoords[3], double derivs[4])
115  {
116  vtkCubicLine::InterpolationDerivs(pcoords,derivs);
117  }
119 
120 protected:
121  vtkCubicLine();
122  ~vtkCubicLine();
123 
125  vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping
126 
127 private:
128  vtkCubicLine(const vtkCubicLine&); // Not implemented.
129  void operator=(const vtkCubicLine&); // Not implemented.
130 };
131 
132 //----------------------------------------------------------------------------
133 inline int vtkCubicLine::GetParametricCenter(double pcoords[3])
134 {
135 
136  pcoords[0]=pcoords[1] = pcoords[2] = 0.0;
137  return 0;
138 }
139 
140 #endif
141 
142 
143 
vtkLine * Line
Definition: vtkCubicLine.h:124
vtkCell * GetEdge(int)
Definition: vtkCubicLine.h:57
int GetNumberOfEdges()
Definition: vtkCubicLine.h:55
virtual void InterpolateDerivs(double pcoords[3], double derivs[4])
Definition: vtkCubicLine.h:114
represent and manipulate point attribute data
Definition: vtkPointData.h:36
int GetParametricCenter(double pcoords[3])
Definition: vtkCubicLine.h:133
vtkCell * GetFace(int)
Definition: vtkCubicLine.h:58
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
abstract superclass for non-linear cells
int vtkIdType
Definition: vtkType.h:275
virtual void InterpolateFunctions(double pcoords[3], double weights[4])
Definition: vtkCubicLine.h:110
dynamic, self-adjusting array of double
cell represents a cubic , isoparametric 1D line
Definition: vtkCubicLine.h:44
cell represents a 1D line
Definition: vtkLine.h:34
abstract class to specify cell behavior
Definition: vtkCell.h:61
virtual double GetParametricDistance(double pcoords[3])
int GetCellDimension()
Definition: vtkCubicLine.h:54
static void InterpolationDerivs(double pcoords[3], double derivs[4])
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkDoubleArray * Scalars
Definition: vtkCubicLine.h:125
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
int GetCellType()
Definition: vtkCubicLine.h:53
int GetNumberOfFaces()
Definition: vtkCubicLine.h:56
static void InterpolationFunctions(double pcoords[3], double weights[4])
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)
object to represent cell connectivity
Definition: vtkCellArray.h:49
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
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
static vtkObject * New()
virtual int GetParametricCenter(double pcoords[3])
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points
Definition: vtkPoints.h:38