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

#pragma once

#include "glmRTTI.h"

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

#include <glmGolaemCharacterDeclarations.h> // GolaemCharacter declarations

namespace glm
{
    struct MeshAssetV7;

    /**
    * \brief Mesh Asset
    */
    class GLM_CORE_API MeshAssetV8
    {
        GLM_RTTI("f40672fa-42e3-43b3-a66e-8ecf6a0b5e32", MeshAssetV8, 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<AssetUnitV3> _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;

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

        MeshAssetV8();
        MeshAssetV8(const MeshAssetV7& 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();
    };

    typedef MeshAssetV8 MeshAsset;
} // namespace glm
