All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
QCMSReaderContext.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "ChunkedFileFormat.h"
6 #include "Types.h"
7 #include "CollisionMaterialIndexLookupPair.h"
8 
9 #include <vector>
10 
11 namespace Eegeo
12 {
13  namespace IO
14  {
15  namespace ChunkedFileFormat
16  {
17  namespace QuantizedMeshSetChunkReader
18  {
19 
21  {
22  const std::vector<u16>& vertexBuffer() const { return m_vertexBuffer; };
23  std::vector<u16>& vertexBuffer() { return m_vertexBuffer; };
24 
25  const std::vector<u16>& indexBuffer() const { return m_indexBuffer; }
26  std::vector<u16>& indexBuffer() { return m_indexBuffer; }
27 
28  const std::vector<u16>& vertexPositionIndices() const { return m_vertexPositionIndices; }
29  std::vector<u16>& vertexPositionIndices() { return m_vertexPositionIndices; }
30 
31  const std::vector<u16>& positionTriListIndices() const { return m_positionTriListIndices; }
32  std::vector<u16>& positionTriListIndices() { return m_positionTriListIndices; }
33 
34  Eegeo::Collision::ContiguousRangeBuilder& collisionRangeBuilder() { return m_collisionRangeBuilder; }
35 
37 
38  void ResizeForMeshInfo(const QuantizedMeshSetChunkReader::QuantizedMeshInfo& meshInfo, size_t destVertexSizeBytes);
39 
40  private:
41  std::vector<u16> m_vertexBuffer;
42  std::vector<u16> m_indexBuffer;
43 
44  // these both index into pPositionLUT
45  std::vector<u16> m_vertexPositionIndices;
46  std::vector<u16> m_positionTriListIndices;
47 
48  Eegeo::Collision::ContiguousRangeBuilder m_collisionRangeBuilder;
49  };
50  }
51  }
52  }
53 }