VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPlotFunctionalBag.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 00034 #ifndef vtkPlotFunctionalBag_h 00035 #define vtkPlotFunctionalBag_h 00036 00037 #include "vtkChartsCoreModule.h" // For export macro 00038 #include "vtkPlot.h" 00039 #include "vtkNew.h" // Needed to hold SP ivars 00040 00041 class vtkDataArray; 00042 class vtkPlotFuntionalBagInternal; 00043 class vtkPlotLine; 00044 class vtkPoints2D; 00045 class vtkScalarsToColors; 00046 00047 class VTKCHARTSCORE_EXPORT vtkPlotFunctionalBag : public vtkPlot 00048 { 00049 public: 00050 vtkTypeMacro(vtkPlotFunctionalBag, vtkPlot); 00051 virtual void PrintSelf(ostream &os, vtkIndent indent); 00052 00054 static vtkPlotFunctionalBag *New(); 00055 00058 virtual bool IsBag(); 00059 00061 virtual bool GetVisible(); 00062 00066 virtual void Update(); 00067 00070 virtual bool Paint(vtkContext2D *painter); 00071 00073 00078 virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect, 00079 int legendIndex); 00081 00083 virtual void GetBounds(double bounds[4]); 00084 00087 virtual void GetUnscaledInputBounds(double bounds[4]); 00088 00090 00091 void SetLookupTable(vtkScalarsToColors *lut); 00092 vtkScalarsToColors *GetLookupTable(); 00094 00097 virtual void CreateDefaultLookupTable(); 00098 00099 //BTX 00101 00104 virtual vtkIdType GetNearestPoint(const vtkVector2f& point, 00105 const vtkVector2f& tolerance, 00106 vtkVector2f* location); 00107 //ETX 00109 00110 virtual bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max); 00111 00113 00114 virtual bool SelectPointsInPolygon(const vtkContextPolygon &polygon); 00115 protected: 00116 vtkPlotFunctionalBag(); 00117 ~vtkPlotFunctionalBag(); 00119 00121 bool GetDataArrays(vtkTable *table, vtkDataArray *array[2]); 00122 00124 bool UpdateTableCache(vtkTable*); 00125 00127 vtkTimeStamp BuildTime; 00128 00130 vtkScalarsToColors *LookupTable; 00131 00133 vtkNew<vtkPlotLine> Line; 00134 00136 vtkNew<vtkPoints2D> BagPoints; 00137 00138 bool LogX, LogY; 00139 00140 private: 00141 vtkPlotFunctionalBag(const vtkPlotFunctionalBag &); // Not implemented. 00142 void operator=(const vtkPlotFunctionalBag &); // Not implemented. 00143 }; 00144 00145 #endif //vtkPlotFunctionalBag_h