VTK  9.1.0
vtkPlotFunctionalBag.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlotFunctionalBag.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 =========================================================================*/
15 
51 #ifndef vtkPlotFunctionalBag_h
52 #define vtkPlotFunctionalBag_h
53 
54 #include "vtkChartsCoreModule.h" // For export macro
55 #include "vtkNew.h" // Needed to hold SP ivars
56 #include "vtkPlot.h"
57 
58 class vtkDataArray;
59 class vtkPlotFuntionalBagInternal;
60 class vtkPlotLine;
61 class vtkPoints2D;
62 class vtkScalarsToColors;
63 
64 class VTKCHARTSCORE_EXPORT vtkPlotFunctionalBag : public vtkPlot
65 {
66 public:
67  vtkTypeMacro(vtkPlotFunctionalBag, vtkPlot);
68  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
74 
79  virtual bool IsBag();
80 
84  bool GetVisible() override;
85 
91  void Update() override;
92 
96  bool Paint(vtkContext2D* painter) override;
97 
104  bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
105 
109  void GetBounds(double bounds[4]) override;
110 
115  void GetUnscaledInputBounds(double bounds[4]) override;
116 
118 
124 
129  virtual void CreateDefaultLookupTable();
130 
137  vtkVector2f* location, vtkIdType* segmentId) override;
139 
143  bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max) override;
144 
148  bool SelectPointsInPolygon(const vtkContextPolygon& polygon) override;
149 
150 protected:
153 
157  bool GetDataArrays(vtkTable* table, vtkDataArray* array[2]);
158 
163 
168 
173 
178 
183 
184  bool LogX, LogY;
185 
186 private:
188  void operator=(const vtkPlotFunctionalBag&) = delete;
189 };
190 
191 #endif // vtkPlotFunctionalBag_h
vtkPlotFunctionalBag::SelectPoints
bool SelectPoints(const vtkVector2f &min, const vtkVector2f &max) override
Select all points in the specified rectangle.
vtkPlotFunctionalBag::GetLookupTable
vtkScalarsToColors * GetLookupTable()
Specify a lookup table for the mapper to use.
vtkPlotFunctionalBag::~vtkPlotFunctionalBag
~vtkPlotFunctionalBag() override
vtkPoints2D
represent and manipulate 2D points
Definition: vtkPoints2D.h:34
vtkPlotFunctionalBag::GetDataArrays
bool GetDataArrays(vtkTable *table, vtkDataArray *array[2])
Populate the data arrays ready to operate on input data.
vtkPlotFunctionalBag::SelectPointsInPolygon
bool SelectPointsInPolygon(const vtkContextPolygon &polygon) override
Select all points in the specified polygon.
vtkPlotFunctionalBag::LookupTable
vtkScalarsToColors * LookupTable
Lookup Table for coloring points by scalar value.
Definition: vtkPlotFunctionalBag.h:172
vtkPlotFunctionalBag::SetLookupTable
void SetLookupTable(vtkScalarsToColors *lut)
Specify a lookup table for the mapper to use.
vtkPlot.h
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:172
vtkPlotFunctionalBag::LogY
bool LogY
Definition: vtkPlotFunctionalBag.h:184
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:52
vtkPlotFunctionalBag::Paint
bool Paint(vtkContext2D *painter) override
Paint event for the plot, called whenever the chart needs to be drawn.
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:73
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
vtkPlot
Abstract class for 2D plots.
Definition: vtkPlot.h:157
max
#define max(a, b)
Definition: vtkX3DExporterFIWriterHelper.h:31
vtkPlotFunctionalBag::Line
vtkNew< vtkPlotLine > Line
The plot line delegate for line series.
Definition: vtkPlotFunctionalBag.h:177
vtkPlot::GetNearestPoint
virtual vtkIdType GetNearestPoint(const vtkVector2f &point, const vtkVector2f &tolerance, vtkVector2f *location, vtkIdType *segmentId)
Function to query a plot for the nearest point to the specified coordinate.
vtkX3D::point
@ point
Definition: vtkX3D.h:242
vtkPlotFunctionalBag::IsBag
virtual bool IsBag()
Returns true if the plot is a functional bag, false if it is a simple line.
vtkPlotFunctionalBag::UpdateTableCache
bool UpdateTableCache(vtkTable *)
Update the table cache.
vtkPlotFunctionalBag::GetNearestPoint
vtkIdType GetNearestPoint(const vtkVector2f &point, const vtkVector2f &tolerance, vtkVector2f *location, vtkIdType *segmentId) override
Function to query a plot for the nearest point to the specified coordinate.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkPlotFunctionalBag::GetBounds
void GetBounds(double bounds[4]) override
Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).
vtkPlotFunctionalBag
Class for drawing an XY line plot or bag given two columns from a vtkTable.
Definition: vtkPlotFunctionalBag.h:65
vtkPlotFunctionalBag::PaintLegend
bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex) override
Paint legend event for the plot, called whenever the legend needs the plot items symbol/mark/line dra...
vtkPlotFunctionalBag::BagPoints
vtkNew< vtkPoints2D > BagPoints
The bag points ordered in quadstrip fashion.
Definition: vtkPlotFunctionalBag.h:182
vtkPlotFunctionalBag::BuildTime
vtkTimeStamp BuildTime
The cache is marked dirty until it has been initialized.
Definition: vtkPlotFunctionalBag.h:167
vtkPlotLine
Class for drawing an XY line plot given two columns from a vtkTable.
Definition: vtkPlotLine.h:32
vtkNew< vtkPlotLine >
vtkContextPolygon
Definition: vtkContextPolygon.h:27
vtkPlotFunctionalBag::New
static vtkPlotFunctionalBag * New()
Creates a functional bag plot object.
vtkPlotFunctionalBag::GetVisible
bool GetVisible() override
Reimplemented to enforce visibility when selected.
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:109
vtkPlotFunctionalBag::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPlotFunctionalBag::vtkPlotFunctionalBag
vtkPlotFunctionalBag()
vtkNew.h
vtkPlotFunctionalBag::Update
void Update() override
Perform any updates to the item that may be necessary before rendering.
vtkX3D::location
@ location
Definition: vtkX3D.h:412
vtkPlotFunctionalBag::GetUnscaledInputBounds
void GetUnscaledInputBounds(double bounds[4]) override
Get the non-log-scaled bounds on chart inputs for this plot as (Xmin, Xmax, Ymin, Ymax).
vtkRectf
Definition: vtkRect.h:336
vtkPlotFunctionalBag::CreateDefaultLookupTable
virtual void CreateDefaultLookupTable()
Create default lookup table.
vtkVector2f
Definition: vtkVector.h:491