summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-05-15 14:25:36 +0200
committerAki <please@ignore.pl>2022-05-15 14:25:56 +0200
commit1b61e9b2b8c3b2218ec5a908a547180a642719e6 (patch)
tree05c998be7d9cffc891cec6f3d09c9d164f9f2f98
parent92d04b664e2e182fab41e63c3465aad898386cb0 (diff)
downloadderelict-1b61e9b2b8c3b2218ec5a908a547180a642719e6.zip
derelict-1b61e9b2b8c3b2218ec5a908a547180a642719e6.tar.gz
derelict-1b61e9b2b8c3b2218ec5a908a547180a642719e6.tar.bz2
Removed example source
-rw-r--r--CMakeLists.txt1
-rw-r--r--ExampleSource.cpp47
-rw-r--r--ExampleSource.h16
3 files changed, 0 insertions, 64 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14a7b02..94427fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,6 @@ find_package(nlohmann_json 3.2 REQUIRED)
add_executable(
${PROJECT_NAME}
DumpSource.cpp
- ExampleSource.cpp
main.cpp
View.cpp
)
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};
-}
diff --git a/ExampleSource.h b/ExampleSource.h
deleted file mode 100644
index cce3d3f..0000000
--- a/ExampleSource.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#pragma once
-
-#include <vector>
-
-#include "Grid.h"
-#include "Source.h"
-
-
-class ExampleSource : public Source
-{
-public:
- ExampleSource();
- std::vector<Grid> grids() const override;
-private:
- mutable float m_time;
-};