#pragma once #include class ScaleEffectApp : public osci::EffectApplication { public: osci::Point apply(int /*index*/, osci::Point input, const std::vector>& values, double /*sampleRate*/) override { return input * osci::Point(values[0], values[1], values[2]); } std::shared_ptr build() const override { auto eff = std::make_shared( std::make_shared(), std::vector{ new osci::EffectParameter("Scale X", "Scales the object in the horizontal direction.", "scaleX", VERSION_HINT, 1.2, -3.0, 3.0), new osci::EffectParameter("Scale Y", "Scales the object in the vertical direction.", "scaleY", VERSION_HINT, 1.2, -3.0, 3.0), new osci::EffectParameter("Scale Z", "Scales the depth of the object.", "scaleZ", VERSION_HINT, 1.2, -3.0, 3.0), } ); eff->setName("Scale"); eff->setIcon(BinaryData::scale_svg); eff->markLockable(true); return eff; } };