From afefd89533c87017bf3fac5ba7a1b6a316da1160 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Thu, 29 Jun 2023 10:12:51 +1000 Subject: [PATCH] Remove unused --- source/base/StarCellularLighting.cpp | 26 -------------------------- source/base/StarCellularLighting.hpp | 2 -- 2 files changed, 28 deletions(-) diff --git a/source/base/StarCellularLighting.cpp b/source/base/StarCellularLighting.cpp index 0578961..49c5676 100644 --- a/source/base/StarCellularLighting.cpp +++ b/source/base/StarCellularLighting.cpp @@ -101,32 +101,6 @@ void CellularLightingCalculator::setupImage(Image& image, PixelFormat format) co image.reset(arrayMax[0] - arrayMin[0], arrayMax[1] - arrayMin[1], format); } -ThreadFunction CellularLightingCalculator::calculateAsync() { - return ThreadFunction([this]() { - Vec2S arrayMin = Vec2S(m_queryRegion.min() - m_calculationRegion.min()); - Vec2S arrayMax = Vec2S(m_queryRegion.max() - m_calculationRegion.min()); - - if (m_monochrome) - m_lightArray.right().calculate(arrayMin[0], arrayMin[1], arrayMax[0], arrayMax[1]); - else - m_lightArray.left().calculate(arrayMin[0], arrayMin[1], arrayMax[0], arrayMax[1]); - - Image output; - setupImage(output, PixelFormat::RGB24); - - for (size_t x = arrayMin[0]; x < arrayMax[0]; ++x) { - for (size_t y = arrayMin[1]; y < arrayMax[1]; ++y) { - if (m_monochrome) - output.set24(x - arrayMin[0], y - arrayMin[1], Color::grayf(m_lightArray.right().getLight(x, y)).toRgb()); - else - output.set24(x - arrayMin[0], y - arrayMin[1], Color::v3fToByte(m_lightArray.left().getLight(x, y))); - } - } - - return output; - }, "CellularLightingCalculator Thread"); -} - void CellularLightIntensityCalculator::setParameters(Json const& config) { m_lightArray.setParameters( config.getInt("spreadPasses"), diff --git a/source/base/StarCellularLighting.hpp b/source/base/StarCellularLighting.hpp index 54be414..30aa489 100644 --- a/source/base/StarCellularLighting.hpp +++ b/source/base/StarCellularLighting.hpp @@ -46,8 +46,6 @@ public: void calculate(Image& output); void setupImage(Image& image, PixelFormat format = PixelFormat::RGB24) const; - - ThreadFunction calculateAsync(); private: Json m_config; bool m_monochrome;