VTK
vtkVertex.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkVertex.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 =========================================================================*/
27 #ifndef __vtkVertex_h
28 #define __vtkVertex_h
29 
30 #include "vtkCell.h"
31 
33 
35 {
36 public:
37  static vtkVertex *New();
38  vtkTypeMacro(vtkVertex,vtkCell);
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
45  int GetCellType() {return VTK_VERTEX;};
46  int GetCellDimension() {return 0;};
47  int GetNumberOfEdges() {return 0;};
48  int GetNumberOfFaces() {return 0;};
49  vtkCell *GetEdge(int) {return 0;};
50  vtkCell *GetFace(int) {return 0;};
51  void Clip(double value, vtkDataArray *cellScalars,
53  vtkPointData *inPd, vtkPointData *outPd,
54  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
55  int insideOut);
56  int EvaluatePosition(double x[3], double* closestPoint,
57  int& subId, double pcoords[3],
58  double& dist2, double *weights);
59  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
60  double *weights);
61  virtual double *GetParametricCoords();
63 
69  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
70 
72 
76  void Contour(double value, vtkDataArray *cellScalars,
77  vtkIncrementalPointLocator *locator, vtkCellArray *verts1,
78  vtkCellArray *lines, vtkCellArray *verts2,
79  vtkPointData *inPd, vtkPointData *outPd,
80  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
82 
84  int GetParametricCenter(double pcoords[3]);
85 
87 
90  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
91  double x[3], double pcoords[3], int& subId);
93 
96  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
97 
99 
101  void Derivatives(int subId, double pcoords[3], double *values,
102  int dim, double *derivs);
104 
106  static void InterpolationFunctions(double pcoords[3], double weights[1]);
108  static void InterpolationDerivs(double pcoords[3], double derivs[3]);
110 
112  virtual void InterpolateFunctions(double pcoords[3], double weights[1])
113  {
114  vtkVertex::InterpolationFunctions(pcoords,weights);
115  }
116  virtual void InterpolateDerivs(double pcoords[3], double derivs[3])
117  {
118  vtkVertex::InterpolationDerivs(pcoords,derivs);
119  }
121 
122 protected:
123  vtkVertex();
125 
126 private:
127  vtkVertex(const vtkVertex&); // Not implemented.
128  void operator=(const vtkVertex&); // Not implemented.
129 };
130 
131 //----------------------------------------------------------------------------
132 inline int vtkVertex::GetParametricCenter(double pcoords[3])
133 {
134  pcoords[0] = pcoords[1] = pcoords[2] = 0.0;
135  return 0;
136 }
137 
138 #endif
139 
140