VTK
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 
30 #include "vtkInteractionWidgetsModule.h" // For export macro
32 
33 class VTKINTERACTIONWIDGETS_EXPORT vtkBezierContourLineInterpolator
35 {
36 public:
37 
42 
44 
48  void PrintSelf(ostream& os, vtkIndent indent);
50 
51  virtual int InterpolateLine( vtkRenderer *ren,
53  int idx1, int idx2 );
54 
56 
62  vtkSetClampMacro(MaximumCurveError, double, 0.0, VTK_DOUBLE_MAX);
63  vtkGetMacro(MaximumCurveError, double);
65 
67 
71  vtkSetClampMacro(MaximumCurveLineSegments, int, 1, 1000);
72  vtkGetMacro(MaximumCurveLineSegments, int);
74 
88  virtual void GetSpan(int nodeIndex, vtkIntArray *nodeIndices,
90 
91 protected:
94 
95  void ComputeMidpoint(double p1[3], double p2[3], double mid[3])
96  {
97  mid[0] = (p1[0] + p2[0])/2;
98  mid[1] = (p1[1] + p2[1])/2;
99  mid[2] = (p1[2] + p2[2])/2;
100  }
101 
104 
105 private:
107  void operator=(const vtkBezierContourLineInterpolator&) VTK_DELETE_FUNCTION;
108 };
109 
110 #endif
vtkBezierContourLineInterpolator::ComputeMidpoint
void ComputeMidpoint(double p1[3], double p2[3], double mid[3])
Definition: vtkBezierContourLineInterpolator.h:95
vtkBezierContourLineInterpolator::vtkBezierContourLineInterpolator
vtkBezierContourLineInterpolator()
vtkContourLineInterpolator
Defines API for interpolating/modifying nodes from a vtkContourRepresentation.
Definition: vtkContourLineInterpolator.h:43
vtkContourRepresentation
represent the vtkContourWidget
Definition: vtkContourRepresentation.h:121
vtkBezierContourLineInterpolator
Interpolates supplied nodes with bezier line segments.
Definition: vtkBezierContourLineInterpolator.h:35
vtkBezierContourLineInterpolator::MaximumCurveError
double MaximumCurveError
Definition: vtkBezierContourLineInterpolator.h:102
vtkBezierContourLineInterpolator::~vtkBezierContourLineInterpolator
~vtkBezierContourLineInterpolator()
vtkBezierContourLineInterpolator::GetSpan
virtual void GetSpan(int nodeIndex, vtkIntArray *nodeIndices, vtkContourRepresentation *rep)
Span of the interpolator, i.e.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:46
vtkBezierContourLineInterpolator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkBezierContourLineInterpolator::MaximumCurveLineSegments
int MaximumCurveLineSegments
Definition: vtkBezierContourLineInterpolator.h:103
vtkBezierContourLineInterpolator::InterpolateLine
virtual int InterpolateLine(vtkRenderer *ren, vtkContourRepresentation *rep, int idx1, int idx2)
Subclasses that wish to interpolate a line segment must implement this.
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkBezierContourLineInterpolator::New
static vtkBezierContourLineInterpolator * New()
Instantiate this class.
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:163
vtkContourLineInterpolator.h