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 
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,
89  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
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 
vtkCellArray * BoundaryTris
virtual int GetCellType()
represent and manipulate point attribute data
Definition: vtkPointData.h:35
virtual int GetNumberOfFaces()=0
virtual int GetParametricCenter(double pcoords[3])
#define VTK_FILTERING_EXPORT
virtual vtkCell * GetEdge(int)
virtual double * GetParametricCoords()
represent and manipulate cell attribute data
Definition: vtkCellData.h:36
virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)=0
virtual void InterpolateFunctions(double pcoords[3], double weights[3])
Definition: vtkCell.h:297
virtual void GetEdgePoints(int vtkNotUsed(edgeId), int *&vtkNotUsed(pts))
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
virtual void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)
vtkDoubleArray * ParametricCoords
int vtkIdType
Definition: vtkType.h:255
virtual void GetFacePoints(int vtkNotUsed(faceId), int *&vtkNotUsed(pts))
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:36
dynamic, self-adjusting array of double
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:45
abstract class to specify cell behavior
Definition: vtkCell.h:57
vtkDoubleArray * TetraScalars
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)
vtkTriangle * Triangle
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
virtual void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)=0
dataset represents arbitrary combinations of all possible cell types
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
void PrintSelf(ostream &os, vtkIndent indent)
virtual int HasFixedTopology()
a 3D cell defined by a set of convex points
virtual vtkCell * GetFace(int faceId)=0
object to represent cell connectivity
Definition: vtkCellArray.h:48
a cell that represents a triangle
Definition: vtkTriangle.h:39
virtual void InterpolateDerivs(double pcoords[3], double derivs[3])
Definition: vtkCell.h:302
virtual int GetNumberOfEdges()
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
virtual int RequiresInitialization()
virtual void Initialize()
Definition: vtkCell.h:92
static vtkObject * New()
virtual int GetParametricCenter(double pcoords[3])
represent and manipulate 3D points
Definition: vtkPoints.h:38