NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
graph_helper.hpp
Go to the documentation of this file.
1/*****************************************************************************
2 NumeRe: Framework fuer Numerische Rechnungen
3 Copyright (C) 2017 Erik Haenel et al.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17******************************************************************************/
18
19#ifndef GRAPH_HELPER_HPP
20#define GRAPH_HELPER_HPP
21
22#include <mgl2/wnd.h>
23#include <mgl2/mgl.h>
24
25#include "plotdata.hpp"
26
32class GraphHelper : public mglDraw
33{
34 private:
35 mglGraph* _graph;
38 bool bHires;
39 double dAspect;
40 std::string sTitle;
41
42 public:
43 GraphHelper(mglGraph* __graph, const PlotData& _pData);
45
46 int Draw(mglGraph* _graph);
47 void Reload();
48 mglGraph* setGrapher()
49 {return _graph;}
51 {return bLightActive;}
52 bool getAlpha()
53 {return bAlphaActive;}
54 bool getHires()
55 {return bHires;}
56 double getAspect()
57 {return dAspect;}
58 void setAspect(double aspect)
59 {dAspect = aspect;}
60 std::string getTitle()
61 {
62 if (sTitle.length())
63 return sTitle;
64 return "Graph";
65 }
66};
67
68
69#endif // GRAPH_HELPER_HPP
70
This class encapsulates the mglGraph object during transmission from the kernel to the GUI.
int Draw(mglGraph *_graph)
Empty virtual function implementation.
GraphHelper(mglGraph *__graph, const PlotData &_pData)
Constructor.
std::string getTitle()
bool getLighting()
void setAspect(double aspect)
double getAspect()
~GraphHelper()
Destructor. Deletes the internal mglGraph pointer.
std::string sTitle
bool getAlpha()
mglGraph * setGrapher()
mglGraph * _graph
bool getHires()
void Reload()
Empty virtual function implementation.
double dAspect
This class contains all the plot settings usable by the plotting algorithm.
Definition: plotdata.hpp:42