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 "vtkCommonDataModelModule.h" // For export macro
36 #include "vtkCell3D.h"
37 
39 class vtkCellArray;
40 class vtkTriangle;
41 class vtkTetra;
42 class vtkDoubleArray;
43 
45 {
46 public:
47  static vtkConvexPointSet *New();
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52  virtual int HasFixedTopology() {return 0;}
53 
55 
56  virtual void GetEdgePoints(int vtkNotUsed(edgeId), int* &vtkNotUsed(pts)) {}
57  virtual void GetFacePoints(int vtkNotUsed(faceId), int* &vtkNotUsed(pts)) {}
58  virtual double *GetParametricCoords();
60 
62  virtual int GetCellType() {return VTK_CONVEX_POINT_SET;}
63 
65 
66  virtual int RequiresInitialization() {return 1;}
67  virtual void Initialize();
69 
71 
80  virtual int GetNumberOfEdges() {return 0;}
81  virtual vtkCell *GetEdge(int) {return NULL;}
82  virtual int GetNumberOfFaces();
83  virtual vtkCell *GetFace(int faceId);
85 
87 
89  virtual void Contour(double value, vtkDataArray *cellScalars,
91  vtkCellArray *lines, vtkCellArray *polys,
92  vtkPointData *inPd, vtkPointData *outPd,
93  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
95 
97 
100  virtual void Clip(double value, vtkDataArray *cellScalars,
101  vtkIncrementalPointLocator *locator, vtkCellArray *connectivity,
102  vtkPointData *inPd, vtkPointData *outPd,
103  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
104  int insideOut);
106 
108 
111  virtual int EvaluatePosition(double x[3], double* closestPoint,
112  int& subId, double pcoords[3],
113  double& dist2, double *weights);
115 
117 
118  virtual void EvaluateLocation(int& subId, double pcoords[3], double x[3],
119  double *weights);
121 
123 
125  virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
126  double x[3], double pcoords[3], int& subId);
128 
130  virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
131 
133 
135  virtual void Derivatives(int subId, double pcoords[3], double *values,
136  int dim, double *derivs);
138 
142  virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
143 
145  virtual int GetParametricCenter(double pcoords[3]);
146 
149  int IsPrimaryCell() {return 0;}
150 
152 
154  virtual void InterpolateFunctions(double pcoords[3], double *sf);
155  virtual void InterpolateDerivs(double pcoords[3], double *derivs);
157 
158 protected:
161 
166 
170 
171 private:
172  vtkConvexPointSet(const vtkConvexPointSet&); // Not implemented.
173  void operator=(const vtkConvexPointSet&); // Not implemented.
174 };
175 
176 //----------------------------------------------------------------------------
177 inline int vtkConvexPointSet::GetParametricCenter(double pcoords[3])
178 {
179  pcoords[0] = pcoords[1] = pcoords[2] = 0.5;
180  return 0;
181 }
182 
183 #endif
184 
185 
186 
vtkCellArray * BoundaryTris
virtual int GetCellType()
represent and manipulate point attribute data
Definition: vtkPointData.h:36
virtual int GetNumberOfFaces()=0
virtual int GetParametricCenter(double pcoords[3])
virtual vtkCell * GetEdge(int)
virtual void InterpolateFunctions(double vtkNotUsed(pcoords)[3], double *vtkNotUsed(weight))
Definition: vtkCell.h:306
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 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:275
virtual void GetFacePoints(int vtkNotUsed(faceId), int *&vtkNotUsed(pts))
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:37
dynamic, self-adjusting array of double
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:46
abstract class to specify cell behavior
Definition: vtkCell.h:61
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:38
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
dataset represents arbitrary combinations of all possible cell types
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
void PrintSelf(ostream &os, vtkIndent indent)
virtual int HasFixedTopology()
a 3D cell defined by a set of convex points
virtual void InterpolateDerivs(double vtkNotUsed(pcoords)[3], double *vtkNotUsed(derivs))
Definition: vtkCell.h:309
virtual vtkCell * GetFace(int faceId)=0
object to represent cell connectivity
Definition: vtkCellArray.h:49
a cell that represents a triangle
Definition: vtkTriangle.h:40
virtual int GetNumberOfEdges()
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
virtual int RequiresInitialization()
virtual void Initialize()
Definition: vtkCell.h:96
static vtkObject * New()
virtual int GetParametricCenter(double pcoords[3])
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points
Definition: vtkPoints.h:38