VTK  9.3.20240419
vtkBezierContourLineInterpolator.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
15 #ifndef vtkBezierContourLineInterpolator_h
16 #define vtkBezierContourLineInterpolator_h
17 
19 #include "vtkInteractionWidgetsModule.h" // For export macro
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class VTKINTERACTIONWIDGETS_EXPORT vtkBezierContourLineInterpolator
24 {
25 public:
30 
32 
36  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
39  int InterpolateLine(vtkRenderer* ren, vtkContourRepresentation* rep, int idx1, int idx2) override;
40 
42 
48  vtkSetClampMacro(MaximumCurveError, double, 0.0, VTK_DOUBLE_MAX);
49  vtkGetMacro(MaximumCurveError, double);
51 
53 
57  vtkSetClampMacro(MaximumCurveLineSegments, int, 1, 1000);
58  vtkGetMacro(MaximumCurveLineSegments, int);
60 
74  void GetSpan(int nodeIndex, vtkIntArray* nodeIndices, vtkContourRepresentation* rep) override;
75 
76 protected:
79 
80  void ComputeMidpoint(double p1[3], double p2[3], double mid[3])
81  {
82  mid[0] = (p1[0] + p2[0]) / 2;
83  mid[1] = (p1[1] + p2[1]) / 2;
84  mid[2] = (p1[2] + p2[2]) / 2;
85  }
86 
89 
90 private:
92  void operator=(const vtkBezierContourLineInterpolator&) = delete;
93 };
94 
95 VTK_ABI_NAMESPACE_END
96 #endif
Interpolates supplied nodes with bezier line segments.
void ComputeMidpoint(double p1[3], double p2[3], double mid[3])
void GetSpan(int nodeIndex, vtkIntArray *nodeIndices, vtkContourRepresentation *rep) override
Span of the interpolator, i.e.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
static vtkBezierContourLineInterpolator * New()
Instantiate this class.
int InterpolateLine(vtkRenderer *ren, vtkContourRepresentation *rep, int idx1, int idx2) override
Subclasses that wish to interpolate a line segment must implement this.
Defines API for interpolating/modifying nodes from a vtkContourRepresentation.
represent the vtkContourWidget
a simple class to control print indentation
Definition: vtkIndent.h:108
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:144
abstract specification for renderers
Definition: vtkRenderer.h:172
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154