summaryrefslogtreecommitdiffhomepage
path: root/ExampleSource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ExampleSource.cpp')
-rw-r--r--ExampleSource.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/ExampleSource.cpp b/ExampleSource.cpp
deleted file mode 100644
index 6083055..0000000
--- a/ExampleSource.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-#include "ExampleSource.h"
-
-#include <cmath>
-#include <utility>
-#include <vector>
-
-#include <raylib.h>
-
-#include "Grid.h"
-#include "Killmail.h"
-
-
-constexpr float MAX {4.0f};
-constexpr float MIN {-4.0f};
-constexpr float STEP {0.2f};
-
-
-ExampleSource::ExampleSource() :
- m_time {0.0f}
-{
-}
-
-
-std::vector<Grid>
-ExampleSource::grids() const
-{
- std::vector<Killmail> killmails;
- killmails.reserve(std::pow((MAX - MIN) / STEP, 2));
- m_time += GetFrameTime();
- if (m_time > 2.0f * M_PI)
- m_time -= 2.0f * M_PI;
- for (float z = MIN; z <= MAX; z += STEP) {
- for (float x = MIN; x <= MAX; x += STEP) {
- Killmail km;
- km.position = {
- x,
- std::cos(x) + std::cos(z + m_time),
- z,
- };
- killmails.push_back(std::move(km));
- }
- }
- Grid grid;
- grid.origin = {0.0, 0.0, 0.0};
- grid.killmails = killmails;
- return {grid};
-}