unlogic
Loading...
Searching...
No Matches
Plot.h
Go to the documentation of this file.
1//
2// Created by Nathan on 11/14/2024.
3//
4
5#ifndef PLOT_H
6#define PLOT_H
7
8#include <string>
9#include <glm/glm.hpp>
10#include "graphic/shape/Shape.h"
11#include "graphic/Color.h"
12
13namespace unlogic
14{
15 using Plot2dFunctionType = double (*)(double);
16
17 class Plot2d : public Shape
18 {
19 std::string name_;
20 Color color_ = Color::Red;
21
22 Plot2dFunctionType fn_ = nullptr;
23
24 glm::vec2 domain_ = {-100.f, 100.f};
25 glm::vec2 range_ = {-10.f, 10.f};
26
27 float precision_ = 0.1f;
28 float line_thickness_ = 0.15f;
29
30 public:
31 Plot2d(std::string name, Plot2dFunctionType fn, Color color);
32 };
33} // namespace unlogic
34
35#endif // PLOT_H
Color color
Definition Shape.h:13
double(*)(double) Plot2dFunctionType
Definition Plot.h:15
static Color Red
Definition Color.h:15