From 1b61e9b2b8c3b2218ec5a908a547180a642719e6 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 15 May 2022 14:25:36 +0200 Subject: Removed example source --- CMakeLists.txt | 1 - ExampleSource.cpp | 47 ----------------------------------------------- ExampleSource.h | 16 ---------------- 3 files changed, 64 deletions(-) delete mode 100644 ExampleSource.cpp delete mode 100644 ExampleSource.h 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 -#include -#include - -#include - -#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 -ExampleSource::grids() const -{ - std::vector 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 - -#include "Grid.h" -#include "Source.h" - - -class ExampleSource : public Source -{ -public: - ExampleSource(); - std::vector grids() const override; -private: - mutable float m_time; -}; -- cgit v1.1