forked from bikaldev/GraphingCalc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PointPlot.hpp
40 lines (38 loc) · 827 Bytes
/
PointPlot.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include "LinReg.hpp"
#include "Matrix.hpp"
#include "PointMarker.hpp"
#include <vector>
class PointPlot
{
private:
std::vector<double> X, Y;
sf::Vector2f origin, offset;
float size;
float amplitude;
float degree;
bool isInputOn;
bool isFitOn;
bool isDrawOn;
LinReg LinearReg;
public:
//constructors:
PointPlot();
PointPlot(sf::Vector2f org, sf::Vector2f off, float s);
//functions
void fitCurve();
void setOffset(sf::Vector2f);
void setOrigin(sf::Vector2f);
void setSize(float);
void setAmplitude(float);
void setDegree(int deg);
void listenToStaticEvent(sf::RenderWindow& window);
void markPoints(sf::RenderWindow& window);
void fitPoints();
void takeInput(sf::Event& evnt, sf::RenderWindow& window);
void takePoint(double x, double y);
void clear();
//destructor
~PointPlot()
{}
};