All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
LandmarkCollisionMeshService.h
1 #pragma once
2 
3 #include "ILandmarkCollisionMeshService.h"
4 #include "Types.h"
5 #include "ICallback.h"
6 
7 #include <string>
8 #include <unordered_map>
9 
10 
11 namespace Eegeo
12 {
13  namespace Collision
14  {
16  {
17  public:
19  Collision::IFeatureCollisionMeshService& featureCollisionMeshService,
20  IFeatureCollisionMeshAddedEvent& featureCollisionMeshAddedEvent,
21  IFeatureCollisionMeshRemovedEvent& featureCollisionMeshRemovedEvent,
22  ILandmarkCollisionMeshesChangedEvent& landmarkCollisionMeshesChangedEvent
23 
24  );
26 
27  std::vector<Collision::CollisionSubMesh> GetMeshesForLandmarkMaterialPrefix(const std::string& landmarkMaterialPrefix) const override;
28 
29  ILandmarkCollisionMeshesChangedEvent& GetLandmarkCollisionMeshesChangedEvent() const override;
30  private:
31  std::vector<std::string> GetAssociatedLandmarkCollisionMaterialIds(const std::string& landmarkMaterialPrefix) const;
32  void OnFeatureCollisionMeshAdded(const CollisionBvh& collisionBvh);
33  void OnFeatureCollisionMeshRemoved(const CollisionBvh& collisionBvh);
34  Collision::IFeatureCollisionMeshService& m_featureCollisionMeshService;
35  IFeatureCollisionMeshAddedEvent& m_featureCollisionMeshAddedEvent;
36  IFeatureCollisionMeshRemovedEvent& m_featureCollisionMeshRemovedEvent;
37  ILandmarkCollisionMeshesChangedEvent& m_landmarkCollisionMeshesChangedEvent;
38 
41 
42 
43  typedef std::unordered_multimap<std::string, const CollisionBvh*> TLandmarkPrefixToCollisionBvh;
44  TLandmarkPrefixToCollisionBvh m_landmarkPrefixToCollisionBvhs;
45 
46  };
47  }
48 }