00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPiecewiseControlPointsItem.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 =========================================================================*/ 00015 00033 #ifndef __vtkPiecewiseControlPointsItem_h 00034 #define __vtkPiecewiseControlPointsItem_h 00035 00036 #include "vtkControlPointsItem.h" 00037 00038 class vtkPiecewiseFunction; 00039 00040 class VTK_CHARTS_EXPORT vtkPiecewiseControlPointsItem: public vtkControlPointsItem 00041 { 00042 public: 00043 vtkTypeMacro(vtkPiecewiseControlPointsItem, vtkControlPointsItem); 00044 virtual void PrintSelf(ostream &os, vtkIndent indent); 00045 00047 static vtkPiecewiseControlPointsItem* New(); 00048 00050 00051 virtual void SetPiecewiseFunction(vtkPiecewiseFunction* function); 00052 // Description 00053 // Get the piecewise function 00054 vtkGetObjectMacro(PiecewiseFunction, vtkPiecewiseFunction); 00056 00060 virtual vtkIdType AddPoint(double* newPos); 00061 00065 virtual vtkIdType RemovePoint(double* pos); 00066 00068 00070 vtkSetMacro(StrokeMode, bool); 00072 00073 protected: 00074 vtkPiecewiseControlPointsItem(); 00075 virtual ~vtkPiecewiseControlPointsItem(); 00076 00077 virtual unsigned long int GetControlPointsMTime(); 00078 00079 virtual int GetNumberOfPoints()const; 00080 virtual void GetControlPoint(vtkIdType index, double *point); 00081 virtual void SetControlPoint(vtkIdType index, double *point); 00082 virtual void EditPoint(float tX, float tY); 00083 00084 vtkPiecewiseFunction* PiecewiseFunction; 00085 00086 private: 00087 vtkPiecewiseControlPointsItem(const vtkPiecewiseControlPointsItem &); // Not implemented. 00088 void operator=(const vtkPiecewiseControlPointsItem &); // Not implemented. 00089 }; 00090 00091 #endif