All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
InteriorFloorAnimator.h
1 // Copyright eeGeo Ltd (2012-2016), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Interiors.h"
7 #include "ICallback.h"
8 #include "IInteriorFloorAnimator.h"
9 #include "Geometry.h"
10 #include "InteriorFloorAnimatorConfiguration.h"
11 #include <vector>
12 
13 namespace Eegeo
14 {
15  namespace Resources
16  {
17  namespace Interiors
18  {
20  {
21  public:
22 
23  static InteriorFloorAnimatorConfiguration CreateDefaultConfig();
24 
25  InteriorFloorAnimator(const InteriorInteractionModel& interiorsInteractionModel, const InteriorFloorAnimatorConfiguration& config);
26 
27 
28  InteriorFloorAnimationState CalcInteriorFloorAnimationState(const InteriorsModel& model, int floorIndex) const;
29 
30  float CalcLookAtHeight() const;
31 
32  v3 CalcFloorCenteredTangentSpaceLookAt() const;
33 
34  private:
35  float CalculateExpandedSpaceBetweenFloors(const InteriorsModel& model) const;
36 
37  const InteriorInteractionModel& m_interiorsInteractionModel;
38 
40  };
41 
42  inline InteriorFloorAnimatorConfiguration InteriorFloorAnimator::CreateDefaultConfig()
43  {
45 
46  config.ExpandedFloorSpacingFactor = 0.3f;
47  config.ExpandedSelectedFloorGapFactor = 0.0f;
48  config.ExpandedGroundOffsetFactor = 0.2f;
49  config.UnselectedFloorBrightness = 0.5f;
50  config.FloorScaleWhenSelected = 1.5f;
51  config.ExpandedSelectedFloorBrightness = 1.2f;
52  config.ExpandedUnselectedFloorBrightness = 0.7f;
53  config.ExpandedDeadZone = 0.0f;
54  config.ExpandedLookAtDeadZone = 0.0f;
55  config.UseBoundsMaxDimension = false;
56  config.UseLargeFloorGapForSmallFloorCount = true;
57  config.FloorScrollingModeChangedMax = 10;
58  config.FloorScrollingModeChangedMin = 5;
59  config.FloorScrollingModeEnabled = true;
60 
61  return config;
62  }
63  }
64  }
65 }