7 #include "RouteSample.h"
9 #include "VectorMath.h"
21 enum RouteSimulationSessionState
28 enum RouteSimulationPlaybackDirection
30 PlaybackDirectionForward,
31 PlaybackDirectionReverse
34 enum RouteSimulationPlaybackSpeed
36 PlaybackSpeedUseLinkSpeedValue,
37 PlaybackSpeedUseLinkSpeedMultiplier,
38 PlaybackSpeedUseCustomSpeed
46 RouteSimulationSessionState m_state;
47 RouteSimulationPlaybackDirection m_playbackDirection;
48 RouteSimulationPlaybackSpeed m_playbackSpeed;
49 float m_linkSpeedMultiplier;
51 bool m_routeCompleted;
55 typedef std::vector<IRouteSimulationSessionObserver*> TSessionObservers;
56 TSessionObservers m_observers;
58 double m_currentRouteParam;
68 int m_currentRouteIndex;
71 void InvalidateRouteSample()
73 m_currentRouteSample = NULL;
78 m_currentRouteSample = &m_routeSampleAllocation;
79 *m_currentRouteSample = v;
91 RouteVertexClassification GetCurrentLinkClassification()
const;
92 v3 GetCurrentDirection()
const;
94 dv3 GetCurrentPositionEcef()
const;
96 const Route& GetRoute()
const;
98 double GetDistanceFromStartInMetres()
const;
100 RouteSimulationSessionState GetSessionState()
const;
102 RouteSimulationPlaybackDirection GetPlaybackDirection()
const;
104 double GetCurrentParam()
const;
106 RouteSimulationPlaybackSpeed GetPlaybackSpeedType()
const;
108 bool IsRouteCompleted()
const;
110 void SetCurrentPositionSnappedToRoute(
const Eegeo::dv3& targetEcef);
112 void StartPlaybackFromBeginning();
120 void SetReversePlaybackDirection();
122 void SetForwardPlaybackDirection();
124 void TogglePlaybackDirection();
126 void Update(
float dt);
128 void UseCustomSpeedValue(
float customSpeedValue);
130 void UseLinkSpeedValueWithMultiplier(
float linkSpeedMultiplier);
132 void UseLinkSpeedValue();
134 bool GetDrivesOnRight()
const;
136 void SetDrivesOnRight(
bool drivesOnRight);
142 bool IsForRoute(
const Route* pRoute)
const
144 return &m_route == pRoute;
147 void UpdatePositionStateFromRouteParam(
const double routeParam);
150 float GetSpeed()
const;