VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkColorTransferControlPointsItem.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 00030 #ifndef __vtkColorTransferControlPointsItem_h 00031 #define __vtkColorTransferControlPointsItem_h 00032 00033 #include "vtkChartsCoreModule.h" // For export macro 00034 #include "vtkControlPointsItem.h" 00035 00036 class vtkColorTransferFunction; 00037 00038 class VTKCHARTSCORE_EXPORT vtkColorTransferControlPointsItem: public vtkControlPointsItem 00039 { 00040 public: 00041 vtkTypeMacro(vtkColorTransferControlPointsItem, vtkControlPointsItem); 00042 virtual void PrintSelf(ostream &os, vtkIndent indent); 00043 00045 static vtkColorTransferControlPointsItem* New(); 00046 00048 void SetColorTransferFunction(vtkColorTransferFunction* function); 00050 00051 vtkGetObjectMacro(ColorTransferFunction, vtkColorTransferFunction); 00053 00055 virtual vtkIdType GetNumberOfPoints()const; 00056 00060 virtual void GetControlPoint(vtkIdType index, double *point)const; 00061 00065 virtual void SetControlPoint(vtkIdType index, double *point); 00066 00070 virtual vtkIdType AddPoint(double* newPos); 00071 00075 virtual vtkIdType RemovePoint(double* pos); 00076 00078 00080 vtkSetMacro(ColorFill, bool); 00081 vtkGetMacro(ColorFill, bool); 00083 00084 protected: 00085 vtkColorTransferControlPointsItem(); 00086 virtual ~vtkColorTransferControlPointsItem(); 00087 00091 virtual bool UsingLogScale(); 00092 00093 virtual void emitEvent(unsigned long event, void* params); 00094 00095 virtual unsigned long int GetControlPointsMTime(); 00096 00097 virtual void DrawPoint(vtkContext2D* painter, vtkIdType index); 00098 virtual void EditPoint(float tX, float tY); 00099 00102 virtual void ComputeBounds(double* bounds); 00103 00104 vtkColorTransferFunction* ColorTransferFunction; 00105 00106 bool ColorFill; 00107 private: 00108 vtkColorTransferControlPointsItem(const vtkColorTransferControlPointsItem &); // Not implemented. 00109 void operator=(const vtkColorTransferControlPointsItem &); // Not implemented. 00110 }; 00111 00112 #endif