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
9using namespace unlogic;
10
11void Scene::AddPlot(char const *name, Plot2dFunctionType function)
12{
13 std::array colors = {
21 };
22 Color color = colors[this->plots.size() % colors.size()];
23
24 this->plots.emplace_back(name, function, color);
25}
double(*)(double) Plot2dFunctionType
Definition Plot.h:15
static Color Pink
Definition Color.h:22
static Color Cyan
Definition Color.h:20
static Color Red
Definition Color.h:15
static Color Green
Definition Color.h:18
static Color Blue
Definition Color.h:19
static Color Orange
Definition Color.h:16
static Color Purple
Definition Color.h:21
void AddPlot(char const *name, Plot2dFunctionType function)
Definition Scene.cpp:11
std::vector< Plot2d > plots
Definition Scene.h:16