VTK
dox/Interaction/Widgets/vtkBezierContourLineInterpolator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkBezierContourLineInterpolator.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00026 #ifndef __vtkBezierContourLineInterpolator_h
00027 #define __vtkBezierContourLineInterpolator_h
00028 
00029 #include "vtkInteractionWidgetsModule.h" // For export macro
00030 #include "vtkContourLineInterpolator.h"
00031 
00032 class VTKINTERACTIONWIDGETS_EXPORT vtkBezierContourLineInterpolator
00033                           : public vtkContourLineInterpolator
00034 {
00035 public:
00036 
00038   static vtkBezierContourLineInterpolator *New();
00039 
00041 
00042   vtkTypeMacro(vtkBezierContourLineInterpolator,vtkContourLineInterpolator);
00043   void PrintSelf(ostream& os, vtkIndent indent);
00045 
00046   virtual int InterpolateLine( vtkRenderer *ren,
00047                                vtkContourRepresentation *rep,
00048                                int idx1, int idx2 );
00049 
00051 
00056   vtkSetClampMacro(MaximumCurveError, double, 0.0, VTK_DOUBLE_MAX);
00057   vtkGetMacro(MaximumCurveError, double);
00059 
00061 
00063   vtkSetClampMacro(MaximumCurveLineSegments, int, 1, 1000);
00064   vtkGetMacro(MaximumCurveLineSegments, int);
00066 
00068 
00076   virtual void GetSpan( int nodeIndex, vtkIntArray *nodeIndices,
00077                         vtkContourRepresentation *rep );
00079 
00080 protected:
00081   vtkBezierContourLineInterpolator();
00082   ~vtkBezierContourLineInterpolator();
00083 
00084   void ComputeMidpoint( double p1[3], double p2[3], double mid[3] )
00085     {
00086       mid[0] = (p1[0] + p2[0])/2;
00087       mid[1] = (p1[1] + p2[1])/2;
00088       mid[2] = (p1[2] + p2[2])/2;
00089     }
00090 
00091   double MaximumCurveError;
00092   int    MaximumCurveLineSegments;
00093 
00094 private:
00095   vtkBezierContourLineInterpolator(const vtkBezierContourLineInterpolator&);  //Not implemented
00096   void operator=(const vtkBezierContourLineInterpolator&);  //Not implemented
00097 };
00098 
00099 #endif