VTK  9.0.3
vtkCell3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCell3D.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 =========================================================================*/
27 #ifndef vtkCell3D_h
28 #define vtkCell3D_h
29 
30 #include "vtkCell.h"
31 #include "vtkCommonDataModelModule.h" // For export macro
32 
34 class vtkTetra;
35 class vtkCellArray;
36 class vtkDoubleArray;
37 
38 class VTKCOMMONDATAMODEL_EXPORT vtkCell3D : public vtkCell
39 {
40 public:
41  vtkTypeMacro(vtkCell3D, vtkCell);
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
51  virtual void GetEdgePoints(vtkIdType edgeId, const vtkIdType*& pts) = 0;
52  // @deprecated Replaced by GetEdgePoints(vtkIdType, const vtkIdType*&) as of VTK 9.0
53  VTK_LEGACY(virtual void GetEdgePoints(int edgeId, int*& pts) = 0;);
54 
64  virtual vtkIdType GetFacePoints(vtkIdType faceId, const vtkIdType*& pts) = 0;
65  // @deprecated Replaced by GetFacePoints(vtkIdType, const vtkIdType*&) as of VTK 9.0
66  VTK_LEGACY(virtual void GetFacePoints(int faceId, int*& pts) = 0;);
67 
75  virtual void GetEdgeToAdjacentFaces(vtkIdType edgeId, const vtkIdType*& faceIds) = 0;
76 
92  virtual vtkIdType GetFaceToAdjacentFaces(vtkIdType faceId, const vtkIdType*& faceIds) = 0;
93 
108  virtual vtkIdType GetPointToIncidentEdges(vtkIdType pointId, const vtkIdType*& edgeIds) = 0;
109 
126  virtual vtkIdType GetPointToIncidentFaces(vtkIdType pointId, const vtkIdType*& faceIds) = 0;
127 
139  virtual vtkIdType GetPointToOneRingPoints(vtkIdType pointId, const vtkIdType*& pts) = 0;
140 
147  virtual bool IsInsideOut();
148 
152  virtual bool GetCentroid(double centroid[3]) const = 0;
153 
154  void Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
155  vtkCellArray* verts, vtkCellArray* lines, vtkCellArray* polys, vtkPointData* inPd,
156  vtkPointData* outPd, vtkCellData* inCd, vtkIdType cellId, vtkCellData* outCd) override;
157 
170  void Clip(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
171  vtkCellArray* connectivity, vtkPointData* inPd, vtkPointData* outPd, vtkCellData* inCd,
172  vtkIdType cellId, vtkCellData* outCd, int insideOut) override;
173 
177  int GetCellDimension() override { return 3; }
178 
180 
185  vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
186  vtkGetMacro(MergeTolerance, double);
188 
189 protected:
191  ~vtkCell3D() override;
192 
195 
196  // used to support clipping
199 
200 private:
201  vtkCell3D(const vtkCell3D&) = delete;
202  void operator=(const vtkCell3D&) = delete;
203 };
204 
205 #endif
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:39
int GetCellDimension() override
The topological dimension of the cell.
Definition: vtkCell3D.h:177
void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut) override
Cut (or clip) the cell based on the input cellScalars and the specified value.
~vtkCell3D() override
virtual void GetFacePoints(int faceId, int *&pts)=0
double MergeTolerance
Definition: vtkCell3D.h:194
virtual vtkIdType GetPointToIncidentEdges(vtkIdType pointId, const vtkIdType *&edgeIds)=0
Get the ids of the incident edges to point of id pointId.
virtual vtkIdType GetPointToOneRingPoints(vtkIdType pointId, const vtkIdType *&pts)=0
Get the ids of a one-ring surrounding point of id pointId.
vtkOrderedTriangulator * Triangulator
Definition: vtkCell3D.h:193
void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd) override
Generate contouring primitives.
virtual vtkIdType GetFacePoints(vtkIdType faceId, const vtkIdType *&pts)=0
Get the list of vertices that define a face.
vtkTetra * ClipTetra
Definition: vtkCell3D.h:197
virtual vtkIdType GetFaceToAdjacentFaces(vtkIdType faceId, const vtkIdType *&faceIds)=0
Get the ids of the adjacent faces to face of id faceId.
virtual bool IsInsideOut()
Returns true if the normals of the vtkCell3D point inside the cell.
virtual bool GetCentroid(double centroid[3]) const =0
Computes the centroid of the cell.
virtual void GetEdgePoints(vtkIdType edgeId, const vtkIdType *&pts)=0
Get the pair of vertices that define an edge.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void GetEdgePoints(int edgeId, int *&pts)=0
virtual void GetEdgeToAdjacentFaces(vtkIdType edgeId, const vtkIdType *&faceIds)=0
Get the ids of the two adjacent faces to edge of id edgeId.
vtkDoubleArray * ClipScalars
Definition: vtkCell3D.h:198
virtual vtkIdType GetPointToIncidentFaces(vtkIdType pointId, const vtkIdType *&faceIds)=0
Get the ids of the incident faces point of id pointId.
object to represent cell connectivity
Definition: vtkCellArray.h:180
represent and manipulate cell attribute data
Definition: vtkCellData.h:33
abstract class to specify cell behavior
Definition: vtkCell.h:57
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
dynamic, self-adjusting array of double
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:34
helper class to generate triangulations
represent and manipulate point attribute data
Definition: vtkPointData.h:32
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:42
@ value
Definition: vtkX3D.h:226
int vtkIdType
Definition: vtkType.h:338