All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
InteriorTransitionModel.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Interiors.h"
6 #include "Types.h"
7 #include "ICallback.h"
8 #include "CallbackCollection.h"
9 
10 namespace Eegeo
11 {
12  namespace Resources
13  {
14  namespace Interiors
15  {
17  {
18  public:
20 
21  void SetVisibilityParam(float param);
22  float GetVisibilityParam() const { return m_visibilityParam; }
23 
24  bool InteriorIsVisible() const;
25  bool IsFadingInOrFullyVisible() const;
26  bool IsTransitioning() const;
27  bool IsFullyVisible() const;
28 
29  void RegisterChangedCallback(Helpers::ICallback0& callback);
30  void UnregisterChangedCallback(Helpers::ICallback0& callback);
31 
32  private:
33  enum VisibilityState
34  {
35  NotVisible,
36  FadingIn,
37  FullyVisible,
38  FadingOut
39  };
40 
41  void NotifiyStateChanged();
42 
43  VisibilityState CalcNextVisibilityState() const;
44 
45  Helpers::CallbackCollection0 m_stateChangedCallbacks;
46 
47  VisibilityState m_visibilityState;
48  float m_visibilityParam;
49  };
50  }
51  }
52 }