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

#pragma once

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

#include "glmString.h"
#include "glmArray.h"
#include "glmPODArray.h"

#include "glmAssetGroupV0.h"
#include "glmMeshAssetV1.h"
#include "glmGeometryAssetV1.h"
#include "glmShadingGroup.h"
#include "glmRenderingTypeV2.h"
#include "glmShaderAssetV1.h"
#include "glmShaderAttributeV0.h"
#include "glmGenericSpecificConverterMappingV6.h"
#include "glmCharacterUserData.h"
#include "glmGolaemCharacterInterface.h"

namespace glm
{
    struct GolaemCharacterV6;

    struct GLM_CORE_API GolaemCharacterV5 : public GolaemCharacterInterface
    {
        GLM_VIRTUAL_RTTI("60cba17f-4bdc-4507-b056-20694e289dc3", glm::GolaemCharacterV5, 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<MeshAssetV1> _meshAssets;

        glm::Array<GeometryAssetV1> _geometryAssets;

        glm::Array<ShadingGroupV1> _shadingGroups;

        glm::Array<ShaderAttributeV0> _shaderAttributes;

        glm::Array<ShaderAssetV1> _shaderAssets;

        glm::Array<RenderingTypeV2> _renderingTypes;

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

        GolaemCharacterV5();
        ~GolaemCharacterV5();

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

        // for serialization only
        const GenericSpecificConverterMappingV6& getConverterMapping() const;
        void setConverterMapping(const GenericSpecificConverterMappingV6& mapping);
        const CharacterUserDataV0& getCharacterUserData() const;
        void setCharacterUserData(const CharacterUserDataV0& userData);
    };
} // namespace glm
