VTK  9.7.20261110
vtkWedge.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
70
71#ifndef vtkWedge_h
72#define vtkWedge_h
73
74#include "vtkCell3D.h"
75#include "vtkCommonDataModelModule.h" // For export macro
76
77VTK_ABI_NAMESPACE_BEGIN
78class vtkLine;
79class vtkTriangle;
80class vtkQuad;
83
84class VTKCOMMONDATAMODEL_EXPORT vtkWedge : public vtkCell3D
85{
86public:
87 static vtkWedge* New();
88 vtkTypeMacro(vtkWedge, vtkCell3D);
89 void PrintSelf(ostream& os, vtkIndent indent) override;
90
95
97
100 void GetEdgePoints(vtkIdType edgeId, const vtkIdType*& pts) override;
101 vtkIdType GetFacePoints(vtkIdType faceId, const vtkIdType*& pts) override;
102 void GetEdgeToAdjacentFaces(vtkIdType edgeId, const vtkIdType*& pts) override;
103 vtkIdType GetFaceToAdjacentFaces(vtkIdType faceId, const vtkIdType*& faceIds) override;
104 vtkIdType GetPointToIncidentEdges(vtkIdType pointId, const vtkIdType*& edgeIds) override;
105 vtkIdType GetPointToIncidentFaces(vtkIdType pointId, const vtkIdType*& faceIds) override;
106 vtkIdType GetPointToOneRingPoints(vtkIdType pointId, const vtkIdType*& pts) override;
107 bool GetCentroid(double centroid[3]) const override;
108 bool IsInsideOut() override;
110
112
115 int GetCellType() override { return Traits::CellType; }
116 int GetCellDimension() override { return Traits::Dimension; }
117 int GetNumberOfEdges() override { return Traits::NumberOfEdges; }
118 int GetNumberOfFaces() override { return Traits::NumberOfFaces; }
119 vtkCell* GetEdge(int edgeId) override;
120 vtkCell* GetFace(int faceId) override;
121 int CellBoundary(int subId, const double pcoords[3], vtkIdList* pts) override;
122 void Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
123 vtkCellArray* verts, vtkCellArray* lines, vtkCellArray* polys, vtkPointData* inPd,
124 vtkPointData* outPd, vtkCellData* inCd, vtkIdType cellId, vtkCellData* outCd) override;
125 void Clip(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
126 vtkCellArray* connectivity, vtkPointData* inPd, vtkPointData* outPd, vtkCellData* inCd,
127 vtkIdType cellId, vtkCellData* outCd, vtkTypeBool insideOut) override;
128 int EvaluatePosition(const double x[3], double closestPoint[3], int& subId, double pcoords[3],
129 double& dist2, double weights[]) override;
130 void EvaluateLocation(int& subId, const double pcoords[3], double x[3], double* weights) override;
131 int IntersectWithLine(const double p1[3], const double p2[3], double tol, double& t, double x[3],
132 double pcoords[3], int& subId) override;
133 int TriangulateLocalIds(int index, vtkIdList* ptIds) override;
135 int subId, const double pcoords[3], const double* values, int dim, double* derivs) override;
136 double* GetParametricCoords() override;
138
146 VTK_DEPRECATED_IN_9_7_0("Use vtkMarchingCellsContourCases::GetWedgeCase instead.")
147 static int* GetTriangleCases(int caseId);
148
152 int GetParametricCenter(double pcoords[3]) override;
153
154 static void InterpolationFunctions(const double pcoords[3], double weights[6]);
155 static void InterpolationDerivs(const double pcoords[3], double derivs[18]);
157
161 void InterpolateFunctions(const double pcoords[3], double weights[6]) override
162 {
163 vtkWedge::InterpolationFunctions(pcoords, weights);
164 }
165 void InterpolateDerivs(const double pcoords[3], double derivs[18]) override
166 {
167 vtkWedge::InterpolationDerivs(pcoords, derivs);
168 }
169 int JacobianInverse(const double pcoords[3], double** inverse, double derivs[18]);
171
173
182 static const vtkIdType* GetFaceArray(vtkIdType faceId) VTK_SIZEHINT(MaximumFaceSize + 1);
184
189
194
199
204
209
213 static bool ComputeCentroid(vtkPoints* points, const vtkIdType* pointIds, double centroid[3]);
214
215protected:
217 ~vtkWedge() override = default;
218
222
223private:
224 vtkWedge(const vtkWedge&) = delete;
225 void operator=(const vtkWedge&) = delete;
226};
227
228inline int vtkWedge::GetParametricCenter(double pcoords[3])
229{
230 pcoords[0] = pcoords[1] = 0.333333;
231 pcoords[2] = 0.5;
232 return 0;
233}
234
235VTK_ABI_NAMESPACE_END
236#endif
object to represent cell connectivity
represent and manipulate cell attribute data
list of point or cell ids
Definition vtkIdList.h:135
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition vtkIndent.h:108
cell represents a 1D line
Definition vtkLine.h:132
represent and manipulate point attribute data
represent and manipulate 3D points
Definition vtkPoints.h:140
a cell that represents a 2D quadrilateral
Definition vtkQuad.h:87
Hold a reference to a vtkObjectBase instance.
a cell that represents a triangle
dataset represents arbitrary combinations of all possible cell types
void Derivatives(int subId, const double pcoords[3], const double *values, int dim, double *derivs) override
See the vtkCell API for descriptions of these methods.
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
See the vtkCell API for descriptions of these methods.
static vtkWedge * New()
void GetEdgeToAdjacentFaces(vtkIdType edgeId, const vtkIdType *&pts) override
See vtkCell3D API for description of these methods.
vtkIdType GetFacePoints(vtkIdType faceId, const vtkIdType *&pts) override
See vtkCell3D API for description of these methods.
int GetNumberOfEdges() override
See the vtkCell API for descriptions of these methods.
Definition vtkWedge.h:117
static const vtkIdType * GetEdgeToAdjacentFacesArray(vtkIdType edgeId)
Static method version of GetEdgeToAdjacentFaces.
static bool ComputeCentroid(vtkPoints *points, const vtkIdType *pointIds, double centroid[3])
Static method version of GetCentroid.
int GetNumberOfFaces() override
See the vtkCell API for descriptions of these methods.
Definition vtkWedge.h:118
vtkIdType GetPointToOneRingPoints(vtkIdType pointId, const vtkIdType *&pts) override
See vtkCell3D API for description of these methods.
~vtkWedge() override=default
static void InterpolationDerivs(const double pcoords[3], double derivs[18])
double * GetParametricCoords() override
See the vtkCell API for descriptions of these methods.
static const vtkIdType * GetFaceToAdjacentFacesArray(vtkIdType faceId)
Static method version of GetFaceToAdjacentFaces.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static const vtkIdType * GetPointToIncidentFacesArray(vtkIdType pointId)
Static method version of GetPointToIncidentFacesArray.
vtkCell * GetEdge(int edgeId) override
See the vtkCell API for descriptions of these methods.
vtkCellTypeTraitsMembersMacro(VTK_WEDGE)
The traits of the cell type, see vtkCellTypeTraits.
static int * GetTriangleCases(int caseId)
Return the case table for table-based isocontouring (aka marching cubes style implementations).
static void InterpolationFunctions(const double pcoords[3], double weights[6])
void InterpolateFunctions(const double pcoords[3], double weights[6]) override
Compute the interpolation functions/derivatives (aka shape functions/derivatives).
Definition vtkWedge.h:161
void EvaluateLocation(int &subId, const double pcoords[3], double x[3], double *weights) override
See the vtkCell API for descriptions of these methods.
vtkIdType GetPointToIncidentFaces(vtkIdType pointId, const vtkIdType *&faceIds) override
See vtkCell3D API for description of these methods.
int GetCellDimension() override
See the vtkCell API for descriptions of these methods.
Definition vtkWedge.h:116
vtkIdType GetPointToIncidentEdges(vtkIdType pointId, const vtkIdType *&edgeIds) override
See vtkCell3D API for description of these methods.
void GetEdgePoints(vtkIdType edgeId, const vtkIdType *&pts) override
See vtkCell3D API for description of these methods.
vtkSmartPointer< vtkLine > Line
Definition vtkWedge.h:219
void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, vtkTypeBool insideOut) override
See the vtkCell API for descriptions of these methods.
int EvaluatePosition(const double x[3], double closestPoint[3], int &subId, double pcoords[3], double &dist2, double weights[]) override
See the vtkCell API for descriptions of these methods.
int TriangulateLocalIds(int index, vtkIdList *ptIds) override
See the vtkCell API for descriptions of these methods.
vtkSmartPointer< vtkQuad > Quad
Definition vtkWedge.h:221
vtkIdType GetFaceToAdjacentFaces(vtkIdType faceId, const vtkIdType *&faceIds) override
See vtkCell3D API for description of these methods.
static const vtkIdType * GetPointToOneRingPointsArray(vtkIdType pointId)
Static method version of GetPointToOneRingPoints.
static const vtkIdType * GetPointToIncidentEdgesArray(vtkIdType pointId)
Static method version of GetPointToIncidentEdgesArray.
static const vtkIdType * GetEdgeArray(vtkIdType edgeId)
Return the ids of the vertices defining edge/face (edgeId/faceId).
bool GetCentroid(double centroid[3]) const override
See vtkCell3D API for description of these methods.
int CellBoundary(int subId, const double pcoords[3], vtkIdList *pts) override
See the vtkCell API for descriptions of these methods.
int GetParametricCenter(double pcoords[3]) override
Return the center of the wedge in parametric coordinates.
Definition vtkWedge.h:228
int JacobianInverse(const double pcoords[3], double **inverse, double derivs[18])
Compute the interpolation functions/derivatives (aka shape functions/derivatives).
vtkCell * GetFace(int faceId) override
See the vtkCell API for descriptions of these methods.
int IntersectWithLine(const double p1[3], const double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId) override
See the vtkCell API for descriptions of these methods.
bool IsInsideOut() override
See vtkCell3D API for description of these methods.
int GetCellType() override
See the vtkCell API for descriptions of these methods.
Definition vtkWedge.h:115
void InterpolateDerivs(const double pcoords[3], double derivs[18]) override
Compute the interpolation functions/derivatives (aka shape functions/derivatives).
Definition vtkWedge.h:165
static const vtkIdType * GetFaceArray(vtkIdType faceId)
Return the ids of the vertices defining edge/face (edgeId/faceId).
vtkSmartPointer< vtkTriangle > Triangle
Definition vtkWedge.h:220
int vtkTypeBool
Definition vtkABI.h:64
@ VTK_WEDGE
Definition vtkCellType.h:50
#define vtkDataArray
#define VTK_DEPRECATED_IN_9_7_0(reason)
int vtkIdType
Definition vtkType.h:366
#define VTK_SIZEHINT(...)