All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TriStripMesh.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Mesh.h"
7 #include "Rendering.h"
8 #include "IdTypes.h"
9 #include <string>
10 
11 namespace Eegeo
12 {
13  namespace Rendering
14  {
20  class TriStripMesh : public Mesh
21  {
22  public:
23  TriStripMesh(const VertexLayouts::VertexLayout& vertexLayout,
24  Rendering::GlBufferPool& glBufferPool,
25  const void* pVertexData,
26  size_t vertexDataSize,
27  const void* pIndexData,
28  size_t indexDataSize,
29  u32 numOfIndices,
30  std::vector<u32> triStripLengths,
31  const std::string& debugName);
32 
33  const bool UsesIndices() const { return m_usesIndices; }
34 
35  const u32 GetStripLength(u32 stripIndex) const;
36  const size_t GetStripCount() const { return m_triStripLengths.size(); }
37 
38  private:
39 
40  std::vector<u32> m_triStripLengths;
41  const bool m_usesIndices;
42  };
43  }
44 }