// Copyright (C) 2022 Jérôme "Lynix" Leclercq (lynix680@gmail.com) // This file is part of the "Nazara Engine - Graphics module" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_GRAPHICS_SKELETONINSTANCE_HPP #define NAZARA_GRAPHICS_SKELETONINSTANCE_HPP #include #include #include #include #include #include #include namespace Nz { class CommandBufferBuilder; class RenderBuffer; class SkeletonInstance; class UploadPool; using SkeletonInstancePtr = std::shared_ptr; class NAZARA_GRAPHICS_API SkeletonInstance : public TransferInterface { public: SkeletonInstance(std::shared_ptr skeleton); SkeletonInstance(const SkeletonInstance&) = delete; SkeletonInstance(SkeletonInstance&& skeletonInstance) noexcept; ~SkeletonInstance() = default; inline std::shared_ptr& GetSkeletalBuffer(); inline const std::shared_ptr& GetSkeletalBuffer() const; inline const std::shared_ptr& GetSkeleton() const; void OnTransfer(RenderFrame& renderFrame, CommandBufferBuilder& builder) override; SkeletonInstance& operator=(const SkeletonInstance&) = delete; SkeletonInstance& operator=(SkeletonInstance&& skeletonInstance) noexcept; private: NazaraSlot(Skeleton, OnSkeletonJointsInvalidated, m_onSkeletonJointsInvalidated); std::shared_ptr m_skeletalDataBuffer; std::shared_ptr m_skeleton; bool m_dataInvalided; }; } #include #endif // NAZARA_GRAPHICS_SKELETONINSTANCE_HPP