VTK  9.2.6
vtkBezierInterpolation.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkBezierInterpolation.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=========================================================================*/
15// .NAME vtkBezierInterpolation
16// .SECTION Description
17// .SECTION See Also
18#ifndef vtkBezierInterpolation_h
19#define vtkBezierInterpolation_h
20
21#include "vtkCommonDataModelModule.h" // For export macro.
22#include "vtkDeprecation.h" // For deprecation macros
24#include "vtkSmartPointer.h" // For API.
25#include "vtkVector.h" // For FlattenSimplex
26
27#include <vector> // For scratch storage.
28
29// Define this to include support for a "complete" (21- vs 18-point) wedge.
30#define VTK_21_POINT_WEDGE true
31
32class vtkPoints;
33class vtkVector2i;
34class vtkVector3d;
35
36class VTKCOMMONDATAMODEL_EXPORT vtkBezierInterpolation : public vtkHigherOrderInterpolation
37{
38public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
42
43 // see Geometrically Exact and Analysis Suitable Mesh Generation Using Rational Bernstein–Bezier
44 // Elements https://scholar.colorado.edu/cgi/viewcontent.cgi?article=1170&context=mcen_gradetds
45 // Chapter 3, pg 25. given a dimension ( 2 triangle, 3 tetrahedron ) and the degree of the
46 // simplex flatten a simplicial bezier function's coordinate to an integer
47 VTK_DEPRECATED_IN_9_1_0("renamed to FlattenSimplex")
48 static int flattenSimplex(const int dim, const int deg, const vtkVector3i coord);
49 static int FlattenSimplex(const int dim, const int deg, const vtkVector3i coord);
50
51 // given a dimension ( 2 triangle, 3 tetrahedron ) and the degree of the simplex,
52 // unflatten a simplicial bezier function integer to a simplicial coordinate
53 VTK_DEPRECATED_IN_9_1_0("renamed to UnFlattenSimplex")
54 static vtkVector3i unflattenSimplex(const int dim, const int deg, const vtkIdType flat);
55 static vtkVector3i UnFlattenSimplex(const int dim, const int deg, const vtkIdType flat);
56
57 // simplicial version of deCasteljau
58 VTK_DEPRECATED_IN_9_1_0("renamed to DeCasteljauSimplex")
59 static void deCasteljauSimplex(
60 const int dim, const int deg, const double* pcoords, double* weights);
61 static void DeCasteljauSimplex(
62 const int dim, const int deg, const double* pcoords, double* weights);
63 VTK_DEPRECATED_IN_9_1_0("renamed to DeCasteljauSimplexDeriv")
65 const int dim, const int deg, const double* pcoords, double* weights);
67 const int dim, const int deg, const double* pcoords, double* weights);
68
69 static void EvaluateShapeFunctions(int order, double pcoord, double* shape);
70 static void EvaluateShapeAndGradient(int order, double pcoord, double* shape, double* grad);
71
72 static int Tensor1ShapeFunctions(const int order[1], const double* pcoords, double* shape);
73 static int Tensor1ShapeDerivatives(const int order[1], const double* pcoords, double* derivs);
74
75 static int Tensor2ShapeFunctions(const int order[2], const double* pcoords, double* shape);
76 static int Tensor2ShapeDerivatives(const int order[2], const double* pcoords, double* derivs);
77
78 static int Tensor3ShapeFunctions(const int order[3], const double* pcoords, double* shape);
79 static int Tensor3ShapeDerivatives(const int order[3], const double* pcoords, double* derivs);
80
81 void Tensor3EvaluateDerivative(const int order[3], const double* pcoords, vtkPoints* points,
82 const double* fieldVals, int fieldDim, double* fieldDerivs) override;
83
85 const int order[3], const vtkIdType numberOfPoints, const double* pcoords, double* shape);
87 const int order[3], const vtkIdType numberOfPoints, const double* pcoords, double* derivs);
88
89 void WedgeEvaluate(const int order[3], const vtkIdType numberOfPoints, const double* pcoords,
90 double* fieldVals, int fieldDim, double* fieldAtPCoords) override;
91
92 void WedgeEvaluateDerivative(const int order[3], const double* pcoords, vtkPoints* points,
93 const double* fieldVals, int fieldDim, double* fieldDerivs) override;
94
95protected:
98
99private:
101 void operator=(const vtkBezierInterpolation&) = delete;
102};
103
104#endif // vtkBezierInterpolation_h
static int Tensor1ShapeFunctions(const int order[1], const double *pcoords, double *shape)
static vtkBezierInterpolation * New()
static int Tensor2ShapeDerivatives(const int order[2], const double *pcoords, double *derivs)
static void deCasteljauSimplexDeriv(const int dim, const int deg, const double *pcoords, double *weights)
void WedgeEvaluateDerivative(const int order[3], const double *pcoords, vtkPoints *points, const double *fieldVals, int fieldDim, double *fieldDerivs) override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static int flattenSimplex(const int dim, const int deg, const vtkVector3i coord)
static void WedgeShapeDerivatives(const int order[3], const vtkIdType numberOfPoints, const double *pcoords, double *derivs)
void WedgeEvaluate(const int order[3], const vtkIdType numberOfPoints, const double *pcoords, double *fieldVals, int fieldDim, double *fieldAtPCoords) override
static vtkVector3i unflattenSimplex(const int dim, const int deg, const vtkIdType flat)
void Tensor3EvaluateDerivative(const int order[3], const double *pcoords, vtkPoints *points, const double *fieldVals, int fieldDim, double *fieldDerivs) override
static int Tensor1ShapeDerivatives(const int order[1], const double *pcoords, double *derivs)
static int FlattenSimplex(const int dim, const int deg, const vtkVector3i coord)
static int Tensor3ShapeFunctions(const int order[3], const double *pcoords, double *shape)
static void DeCasteljauSimplex(const int dim, const int deg, const double *pcoords, double *weights)
static void DeCasteljauSimplexDeriv(const int dim, const int deg, const double *pcoords, double *weights)
static void EvaluateShapeFunctions(int order, double pcoord, double *shape)
static int Tensor2ShapeFunctions(const int order[2], const double *pcoords, double *shape)
static void WedgeShapeFunctions(const int order[3], const vtkIdType numberOfPoints, const double *pcoords, double *shape)
static vtkVector3i UnFlattenSimplex(const int dim, const int deg, const vtkIdType flat)
static int Tensor3ShapeDerivatives(const int order[3], const double *pcoords, double *derivs)
static void deCasteljauSimplex(const int dim, const int deg, const double *pcoords, double *weights)
static void EvaluateShapeAndGradient(int order, double pcoord, double *shape, double *grad)
a simple class to control print indentation
Definition vtkIndent.h:40
represent and manipulate 3D points
Definition vtkPoints.h:40
Some derived classes for the different vectors commonly used.
Definition vtkVector.h:422
#define VTK_DEPRECATED_IN_9_1_0(reason)
int vtkIdType
Definition vtkType.h:332