All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MaterialSelectionView.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Collision.h"
7 #include "CollisionVisualization.h"
8 #include "CollisionVisualizationRenderable.h"
9 
10 #include <vector>
11 #include <string>
12 
13 
14 namespace Eegeo
15 {
16  namespace CollisionVisualization
17  {
19  {
20  public:
21  MaterialSelectionView(const std::string& collisionMaterialId)
22  : m_collisionMaterialId(collisionMaterialId)
23  , m_color(v4::Zero())
24  {}
25 
27 
28  void SetColor(const v4& color) { m_color = color; }
29 
30  void SubmitRenderables(CollisionVisualizationRenderer& renderer);
31 
32  void RefreshRenderables(const std::vector<const Collision::CollisionBvh*>& collisionBvhsForView, MaterialSelectionRenderableFactory& renderableFactory);
33 
34  typedef std::pair<const Collision::CollisionBvh*, CollisionVisualizationRenderable*> BvhRenderablePair;
35  private:
36  typedef std::vector<BvhRenderablePair> BvhRenderablePairs;
37 
38  const std::string m_collisionMaterialId;
39  BvhRenderablePairs m_pairs;
40  v4 m_color;
41 
42  };
43 
44 
45  }
46 }