unlogic
Loading...
Searching...
No Matches
Scene.cpp
Go to the documentation of this file.
1
//
2
// Created by Nathan on 11/12/2024.
3
//
4
5
#include "
Scene.h
"
6
#include <array>
7
#include "
Color.h
"
8
9
using namespace
unlogic
;
10
11
void
Scene::AddPlot
(
char
const
*name,
Plot2dFunctionType
function)
12
{
13
std::array colors = {
14
Color::Red
,
15
Color::Green
,
16
Color::Blue
,
17
Color::Orange
,
18
Color::Cyan
,
19
Color::Pink
,
20
Color::Purple
,
21
};
22
Color
color = colors[this->
plots
.size() % colors.size()];
23
24
this->
plots
.emplace_back(name, function, color);
25
}
Color.h
Scene.h
unlogic
Definition
Compiler.h:18
unlogic::Plot2dFunctionType
double(*)(double) Plot2dFunctionType
Definition
Plot.h:15
unlogic::Color
Definition
Color.h:7
unlogic::Color::Pink
static Color Pink
Definition
Color.h:22
unlogic::Color::Cyan
static Color Cyan
Definition
Color.h:20
unlogic::Color::Red
static Color Red
Definition
Color.h:15
unlogic::Color::Green
static Color Green
Definition
Color.h:18
unlogic::Color::Blue
static Color Blue
Definition
Color.h:19
unlogic::Color::Orange
static Color Orange
Definition
Color.h:16
unlogic::Color::Purple
static Color Purple
Definition
Color.h:21
unlogic::Scene::AddPlot
void AddPlot(char const *name, Plot2dFunctionType function)
Definition
Scene.cpp:11
unlogic::Scene::plots
std::vector< Plot2d > plots
Definition
Scene.h:16
unlogic
src
graphic
Scene.cpp
Generated by
1.9.8