scatter 0.1.0
ColourGridPlot.hpp
1/*
2 * Copyright (C) Tobias Löw (tobi.loew@protonmail.ch)
3 *
4 * This file is part of Scatter
5 *
6 * Scatter is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Scatter is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Scatter. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
22#include <Eigen/Core>
23//
24#include <scatter/Options.hpp>
25#include <scatter/plots/PlotBase.hpp>
26
27namespace scatter
28{
30 class Point;
31 class Arrow;
32
37 class ColourGridPlot : public PlotBase
38 {
39 public:
41 class Options;
42
43 public:
51 ColourGridPlot(const std::string &label, const Eigen::MatrixXd &values, const Options &options);
52
53 ColourGridPlot(const std::string &label, const std::function<double(const double &, const double &)> &function, int resolution,
54 const Options &options);
55
60 virtual ~ColourGridPlot();
61
68
76 void render(Renderer &renderer, const Transform &transform);
77
84
85 private:
87 Eigen::MatrixXd values_;
89 std::unique_ptr<Options> options_;
90
91 public:
93 typedef std::unique_ptr<ColourGridPlot> Ptr;
94
95 static Eigen::MatrixXd evaluate(const std::function<double(const double &, const double &)> &function, int resolution,
96 const Options &options);
97 };
98
99} // namespace scatter
[brief description]
Definition ColourGridPlotOptions.hpp:34
[brief description]
Definition ColourGridPlot.hpp:38
Options * options()
[brief description]
Legend::Entry getLegendEntry()
create LegendEntry
void render(Renderer &renderer, const Transform &transform)
render the ColourGridPlot
virtual ~ColourGridPlot()
destuctor
std::unique_ptr< ColourGridPlot > Ptr
convenience typedef
Definition ColourGridPlot.hpp:93
ColourGridPlot(const std::string &label, const Eigen::MatrixXd &values, const Options &options)
constructor
[brief description]
Definition PlotBase.hpp:36
[brief description]
Definition Renderer.hpp:38
[brief description]
Definition Transform.hpp:36
[brief description]
Definition Legend.hpp:59