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 =========================================================================*/
30 #ifndef vtkConvexPointSet_h
31 #define vtkConvexPointSet_h
32 
33 #include "vtkCommonDataModelModule.h" // For export macro
34 #include "vtkCell3D.h"
35 
37 class vtkCellArray;
38 class vtkTriangle;
39 class vtkTetra;
40 class vtkDoubleArray;
41 
42 class VTKCOMMONDATAMODEL_EXPORT vtkConvexPointSet : public vtkCell3D
43 {
44 public:
45  static vtkConvexPointSet *New();
47  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
48 
52  virtual int HasFixedTopology() {return 0;}
53 
57  void GetEdgePoints(int vtkNotUsed(edgeId), int* &vtkNotUsed(pts)) VTK_OVERRIDE {}
58  void GetFacePoints(int vtkNotUsed(faceId), int* &vtkNotUsed(pts)) VTK_OVERRIDE {}
59  double *GetParametricCoords() VTK_OVERRIDE;
60 
64  int GetCellType() VTK_OVERRIDE {return VTK_CONVEX_POINT_SET;}
65 
69  int RequiresInitialization() VTK_OVERRIDE {return 1;}
70  void Initialize() VTK_OVERRIDE;
71 
73 
83  int GetNumberOfEdges() VTK_OVERRIDE {return 0;}
84  vtkCell *GetEdge(int) VTK_OVERRIDE {return NULL;}
85  int GetNumberOfFaces() VTK_OVERRIDE;
86  vtkCell *GetFace(int faceId) VTK_OVERRIDE;
88 
93  void Contour(double value, vtkDataArray *cellScalars,
95  vtkCellArray *lines, vtkCellArray *polys,
96  vtkPointData *inPd, vtkPointData *outPd,
97  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd) VTK_OVERRIDE;
98 
104  void Clip(double value, vtkDataArray *cellScalars,
105  vtkIncrementalPointLocator *locator, vtkCellArray *connectivity,
106  vtkPointData *inPd, vtkPointData *outPd,
107  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
108  int insideOut) VTK_OVERRIDE;
109 
115  int EvaluatePosition(double x[3], double* closestPoint,
116  int& subId, double pcoords[3],
117  double& dist2, double *weights) VTK_OVERRIDE;
118 
122  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
123  double *weights) VTK_OVERRIDE;
124 
129  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
130  double x[3], double pcoords[3], int& subId) VTK_OVERRIDE;
131 
135  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts) VTK_OVERRIDE;
136 
141  void Derivatives(int subId, double pcoords[3], double *values,
142  int dim, double *derivs) VTK_OVERRIDE;
143 
149  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts) VTK_OVERRIDE;
150 
154  int GetParametricCenter(double pcoords[3]) VTK_OVERRIDE;
155 
160  int IsPrimaryCell() VTK_OVERRIDE {return 0;}
161 
163 
167  void InterpolateFunctions(double pcoords[3], double *sf) VTK_OVERRIDE;
168  void InterpolateDerivs(double pcoords[3], double *derivs) VTK_OVERRIDE;
170 
171 protected:
173  ~vtkConvexPointSet() VTK_OVERRIDE;
174 
175  vtkTetra *Tetra;
176  vtkIdList *TetraIds;
177  vtkPoints *TetraPoints;
178  vtkDoubleArray *TetraScalars;
179 
180  vtkCellArray *BoundaryTris;
181  vtkTriangle *Triangle;
182  vtkDoubleArray *ParametricCoords;
183 
184 private:
185  vtkConvexPointSet(const vtkConvexPointSet&) VTK_DELETE_FUNCTION;
186  void operator=(const vtkConvexPointSet&) VTK_DELETE_FUNCTION;
187 };
188 
189 //----------------------------------------------------------------------------
190 inline int vtkConvexPointSet::GetParametricCenter(double pcoords[3])
191 {
192  pcoords[0] = pcoords[1] = pcoords[2] = 0.5;
193  return 0;
194 }
195 
196 #endif
197 
198 
199 
represent and manipulate point attribute data
Definition: vtkPointData.h:31
virtual int GetNumberOfFaces()=0
Return the number of faces in the cell.
void GetFacePoints(int vtkNotUsed(faceId), int *&vtkNotUsed(pts)) override
virtual void InterpolateFunctions(double vtkNotUsed(pcoords)[3], double *vtkNotUsed(weight))
Compute the interpolation functions/derivatives (aka shape functions/derivatives) No-ops at this leve...
Definition: vtkCell.h:352
virtual double * GetParametricCoords()
Return a contiguous array of parametric coordinates of the points defining this cell.
represent and manipulate cell attribute data
Definition: vtkCellData.h:32
int RequiresInitialization() override
This cell requires that it be initialized prior to access.
Abstract class in support of both point location and point insertion.
int vtkIdType
Definition: vtkType.h:345
void GetEdgePoints(int vtkNotUsed(edgeId), int *&vtkNotUsed(pts)) override
See vtkCell3D API for description of these methods.
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:38
dynamic, self-adjusting array of double
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:41
abstract class to specify cell behavior
Definition: vtkCell.h:56
a simple class to control print indentation
Definition: vtkIndent.h:33
list of point or cell ids
Definition: vtkIdList.h:30
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
virtual int HasFixedTopology()
See vtkCell3D API for description of this method.
a 3D cell defined by a set of convex points
virtual void InterpolateDerivs(double vtkNotUsed(pcoords)[3], double *vtkNotUsed(derivs))
Definition: vtkCell.h:355
object to represent cell connectivity
Definition: vtkCellArray.h:44
a cell that represents a triangle
Definition: vtkTriangle.h:35
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void Initialize()
Definition: vtkCell.h:111
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkCell * GetEdge(int) override
A convex point set has no explicit cell edge or faces; however implicitly (after triangulation) it do...
represent and manipulate 3D points
Definition: vtkPoints.h:33