All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CollisionSubMesh.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Collision.h"
6 #include "VectorMath.h"
7 #include "CollisionGroup.h"
8 #include "AllVertexTypes.h"
9 
10 #include <vector>
11 #include <string>
12 
13 namespace Eegeo
14 {
15  namespace Collision
16  {
18  {
19  dv3 originEcef;
20  v3 quantizationRelativeOrigin;
21  float quantizationScale;
22 
23  CollisionGroup::Type collisionGroup;
24  std::string collisionMaterialId;
25  std::vector<Rendering::VertexTypes::ShortPositionVertex> points;
26  std::vector<u16> triListIndices;
27 
28  v3 GetInflatedPoint(const Rendering::VertexTypes::ShortPositionVertex& q) const
29  {
30  v3 p(q.x, q.y, q.z);
31  p *= quantizationScale;
32  p += quantizationRelativeOrigin;
33  return p;
34  }
35  };
36  }
37 }