VTK  9.1.0
vtkCellValidator.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkCellValidator.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=========================================================================*/
71#ifndef vtkCellValidator_h
72#define vtkCellValidator_h
73
74#include "vtkDataSetAlgorithm.h"
75#include "vtkFiltersGeneralModule.h" // For export macro
76
77class vtkCell;
78class vtkGenericCell;
79class vtkEmptyCell;
80class vtkVertex;
81class vtkPolyVertex;
82class vtkLine;
83class vtkPolyLine;
84class vtkTriangle;
86class vtkPolygon;
87class vtkPixel;
88class vtkQuad;
89class vtkTetra;
90class vtkVoxel;
91class vtkHexahedron;
92class vtkWedge;
93class vtkPyramid;
112class vtkCubicLine;
114class vtkPolyhedron;
115class vtkLagrangeCurve;
118class vtkLagrangeTetra;
120class vtkLagrangeWedge;
121class vtkBezierCurve;
124class vtkBezierTetra;
126class vtkBezierWedge;
127
128class VTKFILTERSGENERAL_EXPORT vtkCellValidator : public vtkDataSetAlgorithm
129{
130public:
132 void PrintSelf(ostream& os, vtkIndent indent) override;
133
134 // Description:
135 // Construct to compute the validity of cells.
137
138 enum State : short
139 {
140 Valid = 0x0,
141 WrongNumberOfPoints = 0x01,
142 IntersectingEdges = 0x02,
143 IntersectingFaces = 0x04,
144 NoncontiguousEdges = 0x08,
145 Nonconvex = 0x10,
146 FacesAreOrientedIncorrectly = 0x20,
147 };
148
149 friend inline State operator&(State a, State b)
150 {
151 return static_cast<State>(static_cast<short>(a) & static_cast<short>(b));
152 }
153 friend inline State operator|(State a, State b)
154 {
155 return static_cast<State>(static_cast<short>(a) | static_cast<short>(b));
156 }
157 friend inline State& operator&=(State& a, State b) { return a = a & b; }
158
159 friend inline State& operator|=(State& a, State b) { return a = a | b; }
160
161 static void PrintState(State state, ostream& os, vtkIndent indent);
162
163 static State Check(vtkGenericCell*, double tolerance);
164 static State Check(vtkCell*, double tolerance);
165
166 static State Check(vtkEmptyCell*, double tolerance);
167 static State Check(vtkVertex*, double tolerance);
168 static State Check(vtkPolyVertex*, double tolerance);
169 static State Check(vtkLine*, double tolerance);
170 static State Check(vtkPolyLine*, double tolerance);
171 static State Check(vtkTriangle*, double tolerance);
172 static State Check(vtkTriangleStrip*, double tolerance);
173 static State Check(vtkPolygon*, double tolerance);
174 static State Check(vtkPixel*, double tolerance);
175 static State Check(vtkQuad*, double tolerance);
176 static State Check(vtkTetra*, double tolerance);
177 static State Check(vtkVoxel*, double tolerance);
178 static State Check(vtkHexahedron*, double tolerance);
179 static State Check(vtkWedge*, double tolerance);
180 static State Check(vtkPyramid*, double tolerance);
181 static State Check(vtkPentagonalPrism*, double tolerance);
182 static State Check(vtkHexagonalPrism*, double tolerance);
183 static State Check(vtkQuadraticEdge*, double tolerance);
184 static State Check(vtkQuadraticTriangle*, double tolerance);
185 static State Check(vtkQuadraticQuad*, double tolerance);
186 static State Check(vtkQuadraticPolygon*, double tolerance);
187 static State Check(vtkQuadraticTetra*, double tolerance);
188 static State Check(vtkQuadraticHexahedron*, double tolerance);
189 static State Check(vtkQuadraticWedge*, double tolerance);
190 static State Check(vtkQuadraticPyramid*, double tolerance);
191 static State Check(vtkBiQuadraticQuad*, double tolerance);
192 static State Check(vtkTriQuadraticHexahedron*, double tolerance);
193 static State Check(vtkTriQuadraticPyramid*, double tolerance);
194 static State Check(vtkQuadraticLinearQuad*, double tolerance);
195 static State Check(vtkQuadraticLinearWedge*, double tolerance);
196 static State Check(vtkBiQuadraticQuadraticWedge*, double tolerance);
198 static State Check(vtkBiQuadraticTriangle*, double tolerance);
199 static State Check(vtkCubicLine*, double tolerance);
200 static State Check(vtkConvexPointSet*, double tolerance);
201 static State Check(vtkPolyhedron*, double tolerance);
202 static State Check(vtkLagrangeCurve*, double tolerance);
203 static State Check(vtkLagrangeTriangle*, double tolerance);
204 static State Check(vtkLagrangeQuadrilateral*, double tolerance);
205 static State Check(vtkLagrangeTetra*, double tolerance);
206 static State Check(vtkLagrangeHexahedron*, double tolerance);
207 static State Check(vtkLagrangeWedge*, double tolerance);
208 static State Check(vtkBezierCurve*, double tolerance);
209 static State Check(vtkBezierTriangle*, double tolerance);
210 static State Check(vtkBezierQuadrilateral*, double tolerance);
211 static State Check(vtkBezierTetra*, double tolerance);
212 static State Check(vtkBezierHexahedron*, double tolerance);
213 static State Check(vtkBezierWedge*, double tolerance);
214
216
221 vtkSetClampMacro(Tolerance, double, 0.0, VTK_DOUBLE_MAX);
222 vtkGetMacro(Tolerance, double);
224
225protected:
227 ~vtkCellValidator() override = default;
228
229 double Tolerance;
230
232
233 static bool NoIntersectingEdges(vtkCell* cell, double tolerance);
234 static bool NoIntersectingFaces(vtkCell* cell, double tolerance);
235 static bool ContiguousEdges(vtkCell* twoDimensionalCell, double tolerance);
236 static bool Convex(vtkCell* cell, double tolerance);
237 static bool FacesAreOrientedCorrectly(vtkCell* threeDimensionalCell, double tolerance);
238
239private:
240 vtkCellValidator(const vtkCellValidator&) = delete;
241 void operator=(const vtkCellValidator&) = delete;
242};
243
244#endif
A 3D cell that represents an arbitrary order Bezier hex.
A 3D cell that represents an arbitrary order Bezier tetrahedron.
A 2D cell that represents an arbitrary order Bezier triangle.
A 3D cell that represents an arbitrary order Bezier wedge.
cell represents a parabolic, 9-node isoparametric quad
cell represents a biquadratic, 24-node isoparametric hexahedron
cell represents a parabolic, 18-node isoparametric wedge
cell represents a parabolic, isoparametric triangle
validates cells in a dataset
static State Check(vtkTriangle *, double tolerance)
static State Check(vtkPentagonalPrism *, double tolerance)
static State Check(vtkLagrangeTetra *, double tolerance)
static State Check(vtkQuadraticEdge *, double tolerance)
static State Check(vtkPolyVertex *, double tolerance)
static State Check(vtkEmptyCell *, double tolerance)
static State Check(vtkPolygon *, double tolerance)
static State Check(vtkLine *, double tolerance)
static State Check(vtkLagrangeQuadrilateral *, double tolerance)
static State Check(vtkHexagonalPrism *, double tolerance)
static State Check(vtkBiQuadraticQuadraticHexahedron *, double tolerance)
static State Check(vtkQuadraticLinearQuad *, double tolerance)
static State Check(vtkCell *, double tolerance)
friend State & operator|=(State &a, State b)
static State Check(vtkGenericCell *, double tolerance)
static State Check(vtkTetra *, double tolerance)
static State Check(vtkQuad *, double tolerance)
static State Check(vtkQuadraticQuad *, double tolerance)
static State Check(vtkWedge *, double tolerance)
static State Check(vtkQuadraticLinearWedge *, double tolerance)
static State Check(vtkPolyLine *, double tolerance)
static bool NoIntersectingFaces(vtkCell *cell, double tolerance)
static State Check(vtkPyramid *, double tolerance)
static State Check(vtkLagrangeCurve *, double tolerance)
static State Check(vtkLagrangeWedge *, double tolerance)
static State Check(vtkBezierQuadrilateral *, double tolerance)
static State Check(vtkQuadraticTriangle *, double tolerance)
static State Check(vtkBiQuadraticQuad *, double tolerance)
static bool NoIntersectingEdges(vtkCell *cell, double tolerance)
friend State operator&(State a, State b)
static State Check(vtkCubicLine *, double tolerance)
static State Check(vtkVoxel *, double tolerance)
~vtkCellValidator() override=default
static bool ContiguousEdges(vtkCell *twoDimensionalCell, double tolerance)
static State Check(vtkBezierHexahedron *, double tolerance)
static State Check(vtkBezierTriangle *, double tolerance)
static State Check(vtkQuadraticPolygon *, double tolerance)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static bool FacesAreOrientedCorrectly(vtkCell *threeDimensionalCell, double tolerance)
static State Check(vtkVertex *, double tolerance)
static State Check(vtkConvexPointSet *, double tolerance)
static State Check(vtkBezierWedge *, double tolerance)
friend State & operator&=(State &a, State b)
static State Check(vtkPolyhedron *, double tolerance)
static State Check(vtkQuadraticWedge *, double tolerance)
static State Check(vtkTriangleStrip *, double tolerance)
static State Check(vtkBezierCurve *, double tolerance)
static State Check(vtkBiQuadraticTriangle *, double tolerance)
static State Check(vtkPixel *, double tolerance)
static State Check(vtkBiQuadraticQuadraticWedge *, double tolerance)
static bool Convex(vtkCell *cell, double tolerance)
static void PrintState(State state, ostream &os, vtkIndent indent)
static State Check(vtkTriQuadraticHexahedron *, double tolerance)
static State Check(vtkQuadraticTetra *, double tolerance)
static vtkCellValidator * New()
static State Check(vtkHexahedron *, double tolerance)
static State Check(vtkTriQuadraticPyramid *, double tolerance)
static State Check(vtkQuadraticHexahedron *, double tolerance)
static State Check(vtkQuadraticPyramid *, double tolerance)
static State Check(vtkBezierTetra *, double tolerance)
static State Check(vtkLagrangeHexahedron *, double tolerance)
static State Check(vtkLagrangeTriangle *, double tolerance)
friend State operator|(State a, State b)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
abstract class to specify cell behavior
Definition: vtkCell.h:147
a 3D cell defined by a set of convex points
cell represents a cubic , isoparametric 1D line
Definition: vtkCubicLine.h:62
Superclass for algorithms that produce output of the same type as input.
an empty cell used as a place-holder during processing
Definition: vtkEmptyCell.h:30
provides thread-safe access to cells
a 3D cell that represents a prism with hexagonal base
a cell that represents a linear 3D hexahedron
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
A 3D cell that represents an arbitrary order Lagrange hex.
A 3D cell that represents an arbitrary order Lagrange tetrahedron.
A 2D cell that represents an arbitrary order Lagrange triangle.
A 3D cell that represents an arbitrary order Lagrange wedge.
cell represents a 1D line
Definition: vtkLine.h:140
a 3D cell that represents a convex prism with pentagonal base
a cell that represents an orthogonal quadrilateral
Definition: vtkPixel.h:74
cell represents a set of 1D lines
Definition: vtkPolyLine.h:146
cell represents a set of 0D vertices
Definition: vtkPolyVertex.h:72
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:149
a 3D cell defined by a set of polygonal faces
Definition: vtkPolyhedron.h:97
a 3D cell that represents a linear pyramid
Definition: vtkPyramid.h:103
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:95
cell represents a parabolic, isoparametric edge
cell represents a parabolic, 20-node isoparametric hexahedron
cell represents a quadratic-linear, 6-node isoparametric quad
cell represents a, 12-node isoparametric wedge
a cell that represents a parabolic n-sided polygon
cell represents a parabolic, 13-node isoparametric pyramid
cell represents a parabolic, 8-node isoparametric quad
cell represents a parabolic, 10-node isoparametric tetrahedron
cell represents a parabolic, isoparametric triangle
cell represents a parabolic, 15-node isoparametric wedge
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:111
cell represents a parabolic, 27-node isoparametric hexahedron
cell represents a parabolic, 13-node isoparametric pyramid
a cell that represents a triangle strip
a cell that represents a triangle
Definition: vtkTriangle.h:145
a cell that represents a 3D point
Definition: vtkVertex.h:100
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:88
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:93
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165