VTK  9.5.2
vtkPlotFunctionalBag.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
22
23#ifndef vtkPlotFunctionalBag_h
24#define vtkPlotFunctionalBag_h
25
26#include "vtkChartsCoreModule.h" // For export macro
27#include "vtkNew.h" // Needed to hold SP ivars
28#include "vtkPlot.h"
29#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
30
31VTK_ABI_NAMESPACE_BEGIN
32class vtkDataArray;
33class vtkPlotFuntionalBagInternal;
34class vtkPlotLine;
35class vtkPoints2D;
37
38class VTKCHARTSCORE_EXPORT VTK_MARSHALAUTO vtkPlotFunctionalBag : public vtkPlot
39{
40public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
48
53 virtual bool IsBag();
54
58 bool GetVisible() override;
59
63 bool Paint(vtkContext2D* painter) override;
64
71 bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
72
76 void GetBounds(double bounds[4]) override;
77
82 void GetUnscaledInputBounds(double bounds[4]) override;
83
85
91
97
103 vtkIdType GetNearestPoint(const vtkVector2f& point, const vtkVector2f& tolerance,
104 vtkVector2f* location, vtkIdType* segmentId) override;
106
110 bool SelectPoints(const vtkVector2f& min, const vtkVector2f& max) override;
111
115 bool SelectPointsInPolygon(const vtkContextPolygon& polygon) override;
116
123 bool UpdateCache() override;
124
125protected:
128
132 bool GetDataArrays(vtkTable* table, vtkDataArray* array[2]);
133
137 bool CacheRequiresUpdate() override;
138
143
148
153
154 bool LogX, LogY;
155
156private:
158 void operator=(const vtkPlotFunctionalBag&) = delete;
159};
160
161VTK_ABI_NAMESPACE_END
162#endif // vtkPlotFunctionalBag_h
Class for drawing 2D primitives to a graphical context.
a simple class to control print indentation
Definition vtkIndent.h:29
Allocate and hold a VTK object.
Definition vtkNew.h:58
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.
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.
bool CacheRequiresUpdate() override
Test if the internal cache requires an update.
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:25
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:27
Superclass for mapping scalar values to colors.
A table, which contains similar-typed columns of data.
Definition vtkTable.h:60
#define vtkDataArray
int vtkIdType
Definition vtkType.h:332
#define VTK_MARSHALAUTO
#define max(a, b)