Files
NazaraEngine/include/Nazara/Utility/VertexMapper.hpp
Lynix b54be6e25f Renamed AttributeUsage and AttributeType
... to VertexComponent and ComponentType.

-Renderer:
Renamed IsVertexAttributeSupported static method to
IsComponentTypeSupported

-VertexDeclaration:
Added IsTypeSupported static method
Renamed [Disable|Enable|Get]Attribute to [Disable|Enable|Get]Component
Removed GetAttributeSize static method

-VertexMapper:
Renamed GetAttributePtr method to GetComponentPtr

Former-commit-id: 7115856e1d389610c35b26f63af5d93a5ad5c690
2014-07-10 18:31:56 +02:00

41 lines
1.0 KiB
C++

// Copyright (C) 2014 Jérôme Leclercq
// 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_VERTEXMAPPER_HPP
#define NAZARA_VERTEXMAPPER_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/SparsePtr.hpp>
#include <Nazara/Math/Vector2.hpp>
#include <Nazara/Math/Vector3.hpp>
#include <Nazara/Utility/BufferMapper.hpp>
#include <Nazara/Utility/Enums.hpp>
#include <Nazara/Utility/Mesh.hpp>
#include <Nazara/Utility/VertexDeclaration.hpp>
class NzSubMesh;
class NAZARA_API NzVertexMapper
{
public:
NzVertexMapper(NzSubMesh* subMesh);
~NzVertexMapper();
template<typename T> NzSparsePtr<T> GetComponentPtr(nzVertexComponent component);
unsigned int GetVertexCount() const;
void Unmap();
private:
NzBufferMapper<NzVertexBuffer> m_mapper;
NzVertexDeclarationConstRef m_declaration;
unsigned int m_vertexCount;
};
#include <Nazara/Utility/VertexMapper.inl>
#endif // NAZARA_VERTEXMAPPER_HPP