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

#pragma once

#include "glmRTTI.h"

#include "glmAssetGroupV2.h" //contains AssetUnitV2
#include "glmClothAsset.h"
#include "glmFurAsset.h"

#include <glmGolaemCharacterDeclarations.h> // GolaemCharacter declarations

namespace glm
{
    struct MeshAssetV6;

    /**
    * \brief Mesh Asset
    */
    struct MeshAssetV7
    {
        GLM_RTTI("e87c63b0-1c41-4c5b-a2b7-63e20d79a6be", MeshAssetV7, addAttributes)
    public:
        GLM_CLASS_STAT_ID( glm::MemoryStatIds::GolaemShared);

        /// The name of the mesh
        glm::GlmString _name;
        glm::GlmString _exportAlias;

        glm::PODArray<int> _shadingGroups;

        glm::Array<AssetUnitV2> _excludedAssets;

        ClothAssetV0 _clothAsset;

        FurAssetV0 _furAsset;

        struct IsFurStatus
        {
            enum Value
            {
                IS_FUR,
                NOT_FUR,
                END //default status, used when the fur state has not be computed yet
            };
        };
        mutable IsFurStatus::Value _isFur;

        // deep group
        glm::GlmString _deepMeshConfFile;
        glm::GlmString _deepMeshName;
        glm::GlmString _deepMeshExportAlias;

        uint32_t _lodLevelFlags; // combination of LodLevelFlags
        PODArray<short> _geometryTags; // can be empty (= any)

        MeshAssetV7();
        MeshAssetV7(const MeshAssetV6& source);

        bool isFur() const;

        bool getFurProperty(const GlmString& propertyName, glm::GlmString& propertyValue) const;

        void setFurProperty(const GlmString& propertyName, const glm::GlmString& propertyValue);

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