/***************************************************************************
*                                                                          *
*  Copyright (C) Golaem S.A.  All Rights Reserved.                         *
*                                                                          *
***************************************************************************/

#pragma once

#include "glmCoreAPI.h"
#include "glmRTTI.h"

namespace glm
{
    class GLM_CORE_API EffectorMirrorSourceV0
    {
        GLM_RTTI("b0d9b338-07c2-477d-bcb9-87f045a64814", glm::EffectorMirrorSourceV0, addRTTIAttributes)
    public:
        GLM_CLASS_STAT_ID( glm::MemoryStatIds::Simulation);

        EffectorMirrorSourceV0()
            : _effectorMirrorSourcesIdx(getClassMemoryStatId())
        {
        }
        EffectorMirrorSourceV0(const EffectorMirrorSourceV0& source);
        EffectorMirrorSourceV0& operator=(const EffectorMirrorSourceV0& source);
        ~EffectorMirrorSourceV0();

        void allocateSources(const size_t effectorMirrorSourcesCount);

        size_t getSourcesCount() const
        {
            return _effectorMirrorSourcesIdx.size();
        }

        int getSourceIdx(const size_t effectorIdx) const
        {
            GLM_ASSERT(effectorIdx < static_cast<size_t>(_effectorMirrorSourcesIdx.size()));
            return _effectorMirrorSourcesIdx[effectorIdx];
        }

        void setSourceIdx(const size_t effectorIdx, const int sourceIdx)
        {
            GLM_ASSERT(effectorIdx < static_cast<size_t>(_effectorMirrorSourcesIdx.size()));
            _effectorMirrorSourcesIdx[effectorIdx] = sourceIdx;
        }

    private:
        glm::PODArray<int> _effectorMirrorSourcesIdx;

        static void addRTTIAttributes();
    };

    typedef EffectorMirrorSourceV0 EffectorMirrorSource;
} // namespace glm
