// Copyright (C) 2022 Jérôme "Lynix" Leclercq (lynix680@gmail.com) // This file is part of the "Nazara Engine - Utility module" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_UTILITY_VERTEXMAPPER_HPP #define NAZARA_UTILITY_VERTEXMAPPER_HPP #include #include #include #include #include namespace Nz { class SubMesh; class NAZARA_UTILITY_API VertexMapper { public: VertexMapper(SubMesh& subMesh); VertexMapper(VertexBuffer& vertexBuffer); ~VertexMapper(); template SparsePtr GetComponentPtr(VertexComponent component, std::size_t componentIndex = 0); inline const VertexBuffer* GetVertexBuffer() const; inline UInt32 GetVertexCount() const; template bool HasComponentOfType(VertexComponent component) const; void Unmap(); private: BufferMapper m_mapper; }; } #include #endif // NAZARA_UTILITY_VERTEXMAPPER_HPP