#pragma once

#include "def.h"

namespace render{
namespace fx{

    class particlesSpawner
    {
    public:
        virtual ~particlesSpawner() = default;
        virtual vec2f getSpawnPos(float) noexcept = 0;
    };

    class particlesSpawnerRect: public particlesSpawner
    {
    public:
        vec2f getSpawnPos(float time) noexcept;
        _loopedParam<vec2f> size;
    };

    class particlesSpawnerRound: public particlesSpawner
    {
    public:
        vec2f getSpawnPos(float time) noexcept;
        _loopedParam<vec2f> size;
    };

    class particlesSpawnerRing: public particlesSpawner
    {
    public:
        vec2f getSpawnPos(float time) noexcept;
        _loopedParam<vec4f> size;
    };

    class particleSpawnerInfo
    {
    public:
        virtual particlesSpawner* create() = 0;
    };

    class particleRectSpawnerInfo: public particleSpawnerInfo
    {
    public:
        virtual particlesSpawner* create();
        _emitterParam<vec2f> sizeParam;
    };
}}
