All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PickingController.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "VectorMath.h"
7 #include "Collision.h"
8 #include "Rendering.h"
9 #include "Modules.h"
10 #include "RenderCamera.h"
11 #include "IRayCaster.h"
12 #include "EnvironmentFlatteningService.h"
13 #include "Interiors.h"
14 #include <vector>
15 #include <string>
16 
17 namespace Eegeo
18 {
19  namespace Picking
20  {
22  {
23  public:
24  // Didn't want to remove environmentFlatteningService as it will break apps which derive from the PickingController
26  const Eegeo::Resources::Interiors::InteriorInteractionModel& interiorInteractionModel,
27  Eegeo::Rendering::EnvironmentFlatteningService& environmentFlatteningService,
28  u32 collisionGroup);
29  virtual ~PickingController();
30 
31  void CastRayFromScreenPosition(const Eegeo::v2& point, const Eegeo::Camera::RenderCamera& renderCamera);
32  virtual void CastRay(const Eegeo::dv3& rayOrigin, const Eegeo::dv3& rayDirection);
33  virtual void ProcessRayCastResult(const Eegeo::Collision::RayCasterResult& pickResult) = 0;
34 
35  u32 GetCollisionGroup() {return m_collisionGroup;}
36  void SetCollisionGroup(u32 collisionGroup);
37 
38  protected:
39  const Eegeo::Resources::Interiors::InteriorInteractionModel& GetInteriorInteractionModel() const { return m_interiorInteractionModel; }
40  private:
41  Eegeo::Collision::IRayCaster& m_rayCaster;
42  const Eegeo::Resources::Interiors::InteriorInteractionModel& m_interiorInteractionModel;
43  u32 m_collisionGroup;
44  };
45  }
46 }