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

#pragma once

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

namespace glm
{
    struct AssetUnitV1;
    struct AssetGroupV1;

    struct AssetUnitV2
    {
        GLM_RTTI("42ee3316-84bd-47de-aeef-819890c84da0", AssetUnitV2, addAttributes);

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

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

		AssetUnitV2();
        ~AssetUnitV2();

        void createFromV1(const AssetUnitV1& assetUnitV1);

    protected:
        /**
		* \brief Inspection needed method declaring the inspectable attributes.
		*/
        static void addAttributes();
    };

    /**
	* \brief Group of assets
	*/
    struct AssetGroupV2
    {
        GLM_RTTI("990672e8-77cf-4875-84ba-f377a799ace4", AssetGroupV2, addAttributes);

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

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

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

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

        glm::Array<AssetUnitV2> _excludedAssets;

		AssetGroupV2();
        ~AssetGroupV2();

        void createFromV1(const AssetGroupV1& AssetGroupV1);

    protected:
        /**
		* \brief Inspection needed method declaring the inspectable attributes.
		*/
        static void addAttributes();
    };
} // namespace glm
