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

#pragma once

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

namespace glm
{
	struct AssetUnitV0;
	struct AssetGroupV0;

	struct GLM_CORE_API AssetUnitV1
    {
        GLM_RTTI("56af9f9e-019e-4b4e-b8df-d6227fec9f85", AssetUnitV1, addAttributes);

    public:
        GLM_CLASS_STAT_ID( glm::MemoryStatIds::GolaemShared);

        int _meshAssetIdx;
        int _assetGroupIdx;
        int _skeletonOverrideIdx;
        int _blindDataOverrideIdx;

        AssetUnitV1();
        ~AssetUnitV1();

        void createFromV0(const AssetUnitV0& assetUnitV0);

    protected:
        static void addAttributes();
    };

    /**
	* \brief Group of assets
	*/
	struct GLM_CORE_API AssetGroupV1
    {
        GLM_RTTI("a44eca36-ea7d-4c6e-b050-a4ab30fdd370", AssetGroupV1, addAttributes);

    public:
        GLM_CLASS_STAT_ID( glm::MemoryStatIds::GolaemShared);

        /// The name of the group
        glm::GlmString _name;

        /// The children
        glm::Array<AssetUnitV1> _children;

        glm::PODArray<float> _weights; // if weights are empty all the children are selected

        glm::Array<AssetUnitV1> _excludedAssets;

        AssetGroupV1();
        ~AssetGroupV1();

        void createFromV0(const AssetGroupV0& AssetGroupV0);

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