VTK: Interaction/Widgets/vtkBezierContourLineInterpolator.h Source File

| VTK 9.3.1

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
18 #include "vtkContourLineInterpolator.h"
19 #include "vtkInteractionWidgetsModule.h" // For export macro
20
21 VTK_ABI_NAMESPACE_BEGIN
22 class VTKINTERACTIONWIDGETS_EXPORT vtkBezierContourLineInterpolator
23 : public vtkContourLineInterpolator
24 {
25 public:
29 static vtkBezierContourLineInterpolator* New();
30
32
35 vtkTypeMacro(vtkBezierContourLineInterpolator, vtkContourLineInterpolator);
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:
77 vtkBezierContourLineInterpolator();
78 ~vtkBezierContourLineInterpolator() override;
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
87 double MaximumCurveError;
88 int MaximumCurveLineSegments;
89
90 private:
91 vtkBezierContourLineInterpolator(const vtkBezierContourLineInterpolator&) = delete;
92 void operator=(const vtkBezierContourLineInterpolator&) = delete;
93 };
94
95 VTK_ABI_NAMESPACE_END
96 #endif
vtkBezierContourLineInterpolator
Interpolates supplied nodes with bezier line segments.
Definition: vtkBezierContourLineInterpolator.h:24
vtkBezierContourLineInterpolator::MaximumCurveError
double MaximumCurveError
Definition: vtkBezierContourLineInterpolator.h:87
vtkBezierContourLineInterpolator::ComputeMidpoint
void ComputeMidpoint(double p1[3], double p2[3], double mid[3])
Definition: vtkBezierContourLineInterpolator.h:80
vtkBezierContourLineInterpolator::GetSpan
void GetSpan(int nodeIndex, vtkIntArray *nodeIndices, vtkContourRepresentation *rep) override
Span of the interpolator, i.e.
vtkBezierContourLineInterpolator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
vtkBezierContourLineInterpolator::~vtkBezierContourLineInterpolator
~vtkBezierContourLineInterpolator() override
vtkBezierContourLineInterpolator::New
static vtkBezierContourLineInterpolator * New()
Instantiate this class.
vtkBezierContourLineInterpolator::vtkBezierContourLineInterpolator
vtkBezierContourLineInterpolator()
vtkBezierContourLineInterpolator::MaximumCurveLineSegments
int MaximumCurveLineSegments
Definition: vtkBezierContourLineInterpolator.h:88
vtkBezierContourLineInterpolator::InterpolateLine
int InterpolateLine(vtkRenderer *ren, vtkContourRepresentation *rep, int idx1, int idx2) override
Subclasses that wish to interpolate a line segment must implement this.
vtkContourLineInterpolator
Defines API for interpolating/modifying nodes from a vtkContourRepresentation.
Definition: vtkContourLineInterpolator.h:32
vtkContourRepresentation
represent the vtkContourWidget
Definition: vtkContourRepresentation.h:119
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:44
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:71
vtkContourLineInterpolator.h
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154