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:
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 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkConvexPointSet::EvaluateLocation
virtual void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)
vtkConvexPointSet::New
static vtkConvexPointSet * New()
vtkConvexPointSet::BoundaryTris
vtkCellArray * BoundaryTris
Definition: vtkConvexPointSet.h:167
vtkConvexPointSet::EvaluatePosition
virtual int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)
vtkConvexPointSet::Tetra
vtkTetra * Tetra
Definition: vtkConvexPointSet.h:162
vtkConvexPointSet::GetEdgePoints
virtual void GetEdgePoints(int vtkNotUsed(edgeId), int *&vtkNotUsed(pts))
Definition: vtkConvexPointSet.h:56
vtkConvexPointSet
a 3D cell defined by a set of convex points
Definition: vtkConvexPointSet.h:45
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkConvexPointSet::vtkConvexPointSet
vtkConvexPointSet()
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
vtkConvexPointSet::GetNumberOfFaces
virtual int GetNumberOfFaces()
vtkConvexPointSet::GetFacePoints
virtual void GetFacePoints(int vtkNotUsed(faceId), int *&vtkNotUsed(pts))
Definition: vtkConvexPointSet.h:57
vtkConvexPointSet::ParametricCoords
vtkDoubleArray * ParametricCoords
Definition: vtkConvexPointSet.h:169
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkConvexPointSet::InterpolateDerivs
virtual void InterpolateDerivs(double pcoords[3], double *derivs)
vtkConvexPointSet::GetCellType
virtual int GetCellType()
Definition: vtkConvexPointSet.h:62
vtkConvexPointSet::Clip
virtual void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkConvexPointSet::GetParametricCenter
virtual int GetParametricCenter(double pcoords[3])
Definition: vtkConvexPointSet.h:177
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkConvexPointSet::GetEdge
virtual vtkCell * GetEdge(int)
Definition: vtkConvexPointSet.h:81
vtkCell3D.h
vtkConvexPointSet::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkConvexPointSet::TetraIds
vtkIdList * TetraIds
Definition: vtkConvexPointSet.h:163
vtkConvexPointSet::IntersectWithLine
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
vtkConvexPointSet::TetraScalars
vtkDoubleArray * TetraScalars
Definition: vtkConvexPointSet.h:165
vtkConvexPointSet::Contour
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)
vtkConvexPointSet::TetraPoints
vtkPoints * TetraPoints
Definition: vtkConvexPointSet.h:164
vtkCell3D
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:38
vtkNotUsed
#define vtkNotUsed(x)
Definition: vtkSetGet.h:557
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
VTK_CONVEX_POINT_SET
@ VTK_CONVEX_POINT_SET
Definition: vtkCellType.h:83
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
vtkConvexPointSet::CellBoundary
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkConvexPointSet::Triangle
vtkTriangle * Triangle
Definition: vtkConvexPointSet.h:168
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:54
vtkConvexPointSet::GetParametricCoords
virtual double * GetParametricCoords()
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkConvexPointSet::HasFixedTopology
virtual int HasFixedTopology()
Definition: vtkConvexPointSet.h:52
vtkTriangle
a cell that represents a triangle
Definition: vtkTriangle.h:41
vtkConvexPointSet::IsPrimaryCell
int IsPrimaryCell()
Definition: vtkConvexPointSet.h:149
vtkConvexPointSet::RequiresInitialization
virtual int RequiresInitialization()
Definition: vtkConvexPointSet.h:66
vtkConvexPointSet::InterpolateFunctions
virtual void InterpolateFunctions(double pcoords[3], double *sf)
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkgl::t
GLdouble GLdouble t
Definition: vtkgl.h:11602
vtkConvexPointSet::GetFace
virtual vtkCell * GetFace(int faceId)
vtkConvexPointSet::GetNumberOfEdges
virtual int GetNumberOfEdges()
Definition: vtkConvexPointSet.h:80
vtkCell::GetParametricCenter
virtual int GetParametricCenter(double pcoords[3])
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:49
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:82
vtkTetra
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:47
vtkConvexPointSet::~vtkConvexPointSet
~vtkConvexPointSet()
vtkConvexPointSet::Triangulate
virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)
vtkConvexPointSet::Initialize
virtual void Initialize()
vtkConvexPointSet::Derivatives
virtual void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)