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
13
namespace
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.h
Shape.h
unlogic::Plot2d
Definition
Plot.h:18
unlogic::Shape
Definition
Shape.h:11
unlogic::Shape::color
Color color
Definition
Shape.h:13
unlogic
Definition
Compiler.h:18
unlogic::Plot2dFunctionType
double(*)(double) Plot2dFunctionType
Definition
Plot.h:15
unlogic::Color
Definition
Color.h:7
unlogic::Color::Red
static Color Red
Definition
Color.h:15
unlogic
src
graphic
shape
Plot.h
Generated by
1.9.8