VTK
vtkConvexPointSet.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkConvexPointSet.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 =========================================================================*/
32 #ifndef __vtkConvexPointSet_h
33 #define __vtkConvexPointSet_h
34 
35 #include "vtkCell3D.h"
36 
37 class vtkUnstructuredGrid;
38 class vtkCellArray;
39 class vtkTriangle;
40 class vtkTetra;
41 class vtkDoubleArray;
42 
44 {
45 public:
46  static vtkConvexPointSet *New();
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
51  virtual int HasFixedTopology() {return 0;}
52 
54 
55  virtual void GetEdgePoints(int vtkNotUsed(edgeId), int* &vtkNotUsed(pts)) {}
56  virtual void GetFacePoints(int vtkNotUsed(faceId), int* &vtkNotUsed(pts)) {}
57  virtual double *GetParametricCoords();
59 
61  virtual int GetCellType() {return VTK_CONVEX_POINT_SET;}
62 
64 
65  virtual int RequiresInitialization() {return 1;}
66  virtual void Initialize();
68 
70 
79  virtual int GetNumberOfEdges() {return 0;}
80  virtual vtkCell *GetEdge(int) {return NULL;}
81  virtual int GetNumberOfFaces();
82  virtual vtkCell *GetFace(int faceId);
84 
86 
88  virtual void Contour(double value, vtkDataArray *cellScalars,
90  vtkCellArray *lines, vtkCellArray *polys,
91  vtkPointData *inPd, vtkPointData *outPd,
92  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
94 
96 
99  virtual void Clip(double value, vtkDataArray *cellScalars,
100  vtkIncrementalPointLocator *locator, vtkCellArray *connectivity,
101  vtkPointData *inPd, vtkPointData *outPd,
102  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
103  int insideOut);
105 
107 
110  virtual int EvaluatePosition(double x[3], double* closestPoint,
111  int& subId, double pcoords[3],
112  double& dist2, double *weights);
114 
116 
117  virtual void EvaluateLocation(int& subId, double pcoords[3], double x[3],
118  double *weights);
120 
122 
124  virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
125  double x[3], double pcoords[3], int& subId);
127 
129  virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
130 
132 
134  virtual void Derivatives(int subId, double pcoords[3], double *values,
135  int dim, double *derivs);
137 
141  virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
142 
144  virtual int GetParametricCenter(double pcoords[3]);
145 
148  int IsPrimaryCell() {return 0;}
149 
151 
153  virtual void InterpolateFunctions(double pcoords[3], double *sf);
154  virtual void InterpolateDerivs(double pcoords[3], double *derivs);
156 
157 protected:
160 
165 
169 
170 private:
171  vtkConvexPointSet(const vtkConvexPointSet&); // Not implemented.
172  void operator=(const vtkConvexPointSet&); // Not implemented.
173 };
174 
175 //----------------------------------------------------------------------------
176 inline int vtkConvexPointSet::GetParametricCenter(double pcoords[3])
177 {
178  pcoords[0] = pcoords[1] = pcoords[2] = 0.5;
179  return 0;
180 }
181 
182 #endif
183 
184 
185