3#include <Common/primitive_type.h>
4#include <Common/assertion.h>
5#include <Utility/TSpan.h>
46 TSpanView<std::shared_ptr<VertexStorage>> vertexStorages);
50 TSpanView<std::shared_ptr<VertexStorage>> vertexStorages,
51 const std::shared_ptr<IndexStorage>& indexStorage);
71 std::vector<std::shared_ptr<VertexStorage>> m_vertexStorages;
72 std::shared_ptr<IndexStorage> m_indexStorage;
87 return m_vertexStorages.size();
92 PH_ASSERT_LT(storageIndex, m_vertexStorages.size());
93 PH_ASSERT(m_vertexStorages[storageIndex]);
94 return *m_vertexStorages[storageIndex].get();
99 PH_ASSERT_LT(storageIndex, m_vertexStorages.size());
100 PH_ASSERT(m_vertexStorages[storageIndex]);
101 return *m_vertexStorages[storageIndex];
106 return m_indexStorage !=
nullptr;
111 PH_ASSERT(m_indexStorage);
112 return *m_indexStorage;
117 PH_ASSERT(m_indexStorage);
118 return *m_indexStorage;
Definition IndexStorage.h:11
std::shared_ptr< IndexStorage > getIndexStorageResource() const
Definition Mesh.cpp:38
const MeshVertexLayoutInfo & getLayout() const
Definition Mesh.h:80
const VertexStorage & getVertexStorage(std::size_t storageIndex) const
Definition Mesh.h:90
const IndexStorage & getIndexStorage() const
Definition Mesh.h:109
bool hasIndexStorage() const
Definition Mesh.h:104
std::size_t numVertexStorages() const
Definition Mesh.h:85
std::shared_ptr< VertexStorage > getVertexStorageResource(std::size_t storageIndex) const
Definition Mesh.cpp:31
Mesh(const MeshVertexLayoutInfo &layout, TSpanView< std::shared_ptr< VertexStorage > > vertexStorages)
Definition Mesh.cpp:11
static constexpr uint8 MAX_ATTRIBUTE_BINDINGS
Definition Mesh.h:21
bool isEmpty() const
Definition Mesh.h:75
std::array< AttributeBinding, MAX_ATTRIBUTE_BINDINGS > attributeBindings
Definition Mesh.h:30
MeshVertexLayoutInfo()
Empty layout.
Definition Mesh.cpp:6
uint8 numAttributes
Definition Mesh.h:32
Definition VertexStorage.h:13
Definition PlatformDisplay.h:13
uint8 storageIndex
Definition Mesh.h:25
uint8 attributeIndex
Definition Mesh.h:26