VTK  9.1.0
vtkBezierContourLineInterpolator.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkBezierContourLineInterpolator.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=========================================================================*/
27#ifndef vtkBezierContourLineInterpolator_h
28#define vtkBezierContourLineInterpolator_h
29
31#include "vtkInteractionWidgetsModule.h" // For export macro
32
33class VTKINTERACTIONWIDGETS_EXPORT vtkBezierContourLineInterpolator
35{
36public:
41
43
47 void PrintSelf(ostream& os, vtkIndent indent) override;
49
50 int InterpolateLine(vtkRenderer* ren, vtkContourRepresentation* rep, int idx1, int idx2) override;
51
53
59 vtkSetClampMacro(MaximumCurveError, double, 0.0, VTK_DOUBLE_MAX);
60 vtkGetMacro(MaximumCurveError, double);
62
64
68 vtkSetClampMacro(MaximumCurveLineSegments, int, 1, 1000);
69 vtkGetMacro(MaximumCurveLineSegments, int);
71
85 void GetSpan(int nodeIndex, vtkIntArray* nodeIndices, vtkContourRepresentation* rep) override;
86
87protected:
90
91 void ComputeMidpoint(double p1[3], double p2[3], double mid[3])
92 {
93 mid[0] = (p1[0] + p2[0]) / 2;
94 mid[1] = (p1[1] + p2[1]) / 2;
95 mid[2] = (p1[2] + p2[2]) / 2;
96 }
97
100
101private:
103 void operator=(const vtkBezierContourLineInterpolator&) = delete;
104};
105
106#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:113
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:149
abstract specification for renderers
Definition: vtkRenderer.h:182
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165