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

#pragma once

#include "glmCoreAPI.h"
#include "glmRTTI.h"
#include "glmPODArray.h"
#include "glmArray.h"
#include "glmVector3.h"

#include <glmGolaemCharacterDeclarations.h> // GolaemCharacter declarations

namespace glm
{
    /**
	* \brief Represent a set of bones that overrides some skeleton proportions
	*
	* \author dev@golaem.com
	*
	*/
    struct GLM_CORE_API SkeletonOverrideV0
    {
        GLM_RTTI("5d8a273f-cbda-4e36-80f6-455d30c63ceb", glm::SkeletonOverrideV0, addAttributes);

    public:
        SkeletonOverrideV0()
            : _name("SkeletonOverride")
            , _skeletonBonesLocalPosWeightMin(1)
            , _skeletonBonesLocalPosWeightMax(1)
            , _skeletonBonesLocalOriWeightMin(1)
            , _skeletonBonesLocalOriWeightMax(1)
            , _skeletonBonesSkinScalesWeightMin(1)
            , _skeletonBonesSkinScalesWeightMax(1)
            , _randomSeed(1)
        {
        }

        glm::GlmString _name;

        //local pos overrides
        PODArray<unsigned int> _skeletonBonesLocalPosIndices;
        Array<Vector3> _skeletonBonesLocalPosScales;
        float _skeletonBonesLocalPosWeightMin;
        float _skeletonBonesLocalPosWeightMax;

        //local ori overrides
        PODArray<unsigned int> _skeletonBonesLocalOriIndices;
        Array<Vector3> _skeletonBonesLocalOriOffsets; //XYZ local angles in degree
        float _skeletonBonesLocalOriWeightMin;
        float _skeletonBonesLocalOriWeightMax;

        //skinning scale overrides
        PODArray<unsigned int> _skeletonBonesSkinScalesIndices;
        Array<Vector3> _skeletonBonesSkinScales;
        float _skeletonBonesSkinScalesWeightMin;
        float _skeletonBonesSkinScalesWeightMax;

        uint32_t _randomSeed;

    private:
        static void addAttributes();
    };
} // namespace glm
