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

#pragma once

#include "glmCoreAPI.h"
#include "glmRTTI.h"
#include "glmAssetGroupV0.h"
#include "glmMeshAssetV2.h"
#include "glmGeometryAssetV1.h"
#include "glmShadingGroup.h"
#include "glmRenderingType.h"
#include "glmGenericSpecificConverterMappingV7.h"
#include "glmCharacterUserData.h"
#include "glmShaderAssetV1.h"
#include "glmShaderAttributeV0.h"
#include "glmClothAsset.h"
#include "glmRenderingTypeV3.h"
#include "glmGolaemCharacterInterface.h"

namespace glm
{
    struct GolaemCharacterV7;

    struct GLM_CORE_API GolaemCharacterV8 : public GolaemCharacterInterface
    {
        GLM_VIRTUAL_RTTI("0804a8dc-58cb-4205-a8e6-6e0c2c3365ad", glm::GolaemCharacterV8, addAttributes);

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

        /// Name of the character
        glm::GlmString _name;

        glm::PODArray<int> _mainAssetGroups;

        glm::Array<AssetGroupV0> _allAssetGroups;
        glm::Array<MeshAssetV2> _meshAssets;

        glm::Array<GeometryAssetV1> _geometryAssets;

        glm::Array<ShadingGroupV1> _shadingGroups;

        glm::Array<ShaderAttributeV0> _shaderAttributes;

        glm::Array<ShaderAssetV1> _shaderAssets;

        glm::Array<RenderingTypeV3> _renderingTypes;

        GenericSpecificConverterMappingV7 _converterMapping; // animation data
        CharacterUserDataV0 _characterUserData;              // additional user data

        GolaemCharacterV8();
        ~GolaemCharacterV8();

        /**
		* \brief V7 backwards compatibility
		* \note MeshAsset had no ClothAsset
		*/
        void createFromV7(GolaemCharacterV7& characterV7);

    private:
        GLM_DISALLOW_COPY_AND_ASSIGN(GolaemCharacterV8);
        static void addAttributes();

        // Accessors
        const GenericSpecificConverterMappingV7& getConverterMapping() const;
        void setConverterMapping(const GenericSpecificConverterMappingV7& mapping);
        const CharacterUserDataV0& getCharacterUserData() const;
        void setCharacterUserData(const CharacterUserDataV0& userData);
    };
} // namespace glm
