VTK  9.2.6
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
32#ifndef vtkPlotFunctionalBag_h
33#define vtkPlotFunctionalBag_h
34
35#include "vtkChartsCoreModule.h" // For export macro
36#include "vtkNew.h" // Needed to hold SP ivars
37#include "vtkPlot.h"
38
39class vtkDataArray;
40class vtkPlotFuntionalBagInternal;
41class vtkPlotLine;
42class vtkPoints2D;
44
45class VTKCHARTSCORE_EXPORT vtkPlotFunctionalBag : public vtkPlot
46{
47public:
49 void PrintSelf(ostream& os, vtkIndent indent) override;
50
55
60 virtual bool IsBag();
61
65 bool GetVisible() override;
66
70 bool Paint(vtkContext2D* painter) override;
71
78 bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
79
83 void GetBounds(double bounds[4]) override;
84
89 void GetUnscaledInputBounds(double bounds[4]) override;
90
92
98
104
110 vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance,
111 vtkVector2f* location, vtkIdType* segmentId) override;
113
117 bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max) override;
118
122 bool SelectPointsInPolygon(const vtkContextPolygon& polygon) override;
123
130 bool UpdateCache() override;
131
132protected:
135
139 bool GetDataArrays(vtkTable* table, vtkDataArray* array[2]);
140
144 virtual bool CacheRequiresUpdate() override;
145
150
155
160
161 bool LogX, LogY;
162
163private:
165 void operator=(const vtkPlotFunctionalBag&) = delete;
166};
167
168#endif // vtkPlotFunctionalBag_h
Class for drawing 2D primitives to a graphical context.
abstract superclass for arrays of numeric data
a simple class to control print indentation
Definition vtkIndent.h:34
Allocate and hold a VTK object.
Definition vtkNew.h:56
Class for drawing an XY line plot or bag given two columns from a vtkTable.
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() override
vtkScalarsToColors * LookupTable
Lookup Table for coloring points by scalar value.
void GetUnscaledInputBounds(double bounds[4]) override
Get the non-log-scaled bounds on chart inputs for this plot as (Xmin, Xmax, Ymin, Ymax).
bool GetDataArrays(vtkTable *table, vtkDataArray *array[2])
Populate the data arrays ready to operate on input data.
bool SelectPoints(const vtkVector2f &min, const vtkVector2f &max) override
Select all points in the specified rectangle.
virtual bool IsBag()
Returns true if the plot is a functional bag, false if it is a simple line.
void GetBounds(double bounds[4]) override
Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).
void SetLookupTable(vtkScalarsToColors *lut)
Specify a lookup table for the mapper to use.
bool SelectPointsInPolygon(const vtkContextPolygon &polygon) override
Select all points in the specified polygon.
virtual void CreateDefaultLookupTable()
Create default lookup table.
bool UpdateCache() override
Update the internal cache.
bool Paint(vtkContext2D *painter) override
Paint event for the plot, called whenever the chart needs to be drawn.
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.
virtual bool CacheRequiresUpdate() override
Test if the internal cache requires an update.
static vtkPlotFunctionalBag * New()
Creates a functional bag plot object.
vtkNew< vtkPoints2D > BagPoints
The bag points ordered in quadstrip fashion.
bool GetVisible() override
Reimplemented to enforce visibility when selected.
vtkScalarsToColors * GetLookupTable()
Specify a lookup table for the mapper to use.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkNew< vtkPlotLine > Line
The plot line delegate for line series.
Class for drawing an XY line plot given two columns from a vtkTable.
Definition vtkPlotLine.h:32
Abstract class for 2D plots.
Definition vtkPlot.h:48
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.
represent and manipulate 2D points
Definition vtkPoints2D.h:34
Superclass for mapping scalar values to colors.
A table, which contains similar-typed columns of data.
Definition vtkTable.h:68
int vtkIdType
Definition vtkType.h:332
#define max(a, b)