![]() |
Rise
The Vieneo Province
|
#include <TurnByTurn.h>
Public Member Functions | |
| TurnByTurn (Bus *pBus, Logger *pLoggger, Networking *pNetworking) | |
| ~TurnByTurn () | |
| void | Update (bool pIsGrndVehicle, float pElasedTime) |
| void | Draw (Rendering::RenderDevice *pd3dDevice, const StreetMapProjection &map) |
| void | UpdateVB (const StreetMapProjection &map) |
| void | CreateVB (Rendering::RenderDevice *pd3dDevice) |
| Direction | GetDirection (float bearing) const |
| float | GetHeadingToNextNode () const |
| void | ReleaseResources () |
Private Types | |
| enum | UpdateType { TYPE_APPROACHING_NEXT_NODE = 0 , TYPE_NEXT_NODE = 1 , TYPE_CONTINUE_TO_NEXT_NODE = 2 , TYPE_RECALCULATING = 4 , TYPE_NAVIGATION_COMPLETED = 5 , TYPE_MAPPED_ROUTE_ENDED = 6 } |
| enum | Direction { STRAIGHT = 0 , BEAR_LEFT = 1 , TURN_LEFT = 2 , BEAR_RIGHT = 3 , TURN_RIGHT = 4 , U_TURN = 5 } |
Private Member Functions | |
| void | sendUpdateToServer (int pEdgeId, float pDistance, float pDirection, UpdateType pType) const |
| void | Trace (char *msg, Logger::Level severity=Logger::Level::Info) const |
Static Private Member Functions | |
| static float | angleBetweenPositionsDeg (const RiseMath::Vector2 &vectorA, const RiseMath::Vector2 &vectorB) |
| static float | distanceBetweenPositions (const RiseMath::Vector2 &vectorA, const RiseMath::Vector2 &vectorB) |
| static float | convertDistanceToMeters (float dist) |
| static float | vectorToDegrees (const RiseMath::Vector2 &vec) |
| static float | getHeadingChange (float targetHeading, float currentHeading) |
| static float | customModulo (float a, float n) |
Private Attributes | |
| Bus * | bus = nullptr |
| Logger * | logger = nullptr |
| Networking * | networking = nullptr |
| Rendering::RenderBuffer * | m_avRouteMap = nullptr |
| RiseMath::Vector2 | vehiclePosTcp |
| size_t | nextNodeIndex = 0 |
| int | routeWaypointId = 0 |
| size_t | lineCount = 0 |
| RouteGuidance | guidance |
Definition at line 8 of file TurnByTurn.h.
|
private |
| Enumerator | |
|---|---|
| STRAIGHT | |
| BEAR_LEFT | |
| TURN_LEFT | |
| BEAR_RIGHT | |
| TURN_RIGHT | |
| U_TURN | |
Definition at line 32 of file TurnByTurn.h.
|
private |
| Enumerator | |
|---|---|
| TYPE_APPROACHING_NEXT_NODE | |
| TYPE_NEXT_NODE | |
| TYPE_CONTINUE_TO_NEXT_NODE | |
| TYPE_RECALCULATING | |
| TYPE_NAVIGATION_COMPLETED | |
| TYPE_MAPPED_ROUTE_ENDED | |
Definition at line 22 of file TurnByTurn.h.
| TurnByTurn::TurnByTurn | ( | Bus * | pBus, |
| Logger * | pLoggger, | ||
| Networking * | pNetworking ) |
| TurnByTurn::~TurnByTurn | ( | ) |
Definition at line 12 of file TurnByTurn.cpp.
|
staticprivate |
Definition at line 237 of file TurnByTurn.cpp.
|
staticprivate |
Definition at line 265 of file TurnByTurn.cpp.
| void TurnByTurn::CreateVB | ( | Rendering::RenderDevice * | pd3dDevice | ) |
Definition at line 138 of file TurnByTurn.cpp.
|
staticprivate |
|
staticprivate |
Definition at line 259 of file TurnByTurn.cpp.
| void TurnByTurn::Draw | ( | Rendering::RenderDevice * | pd3dDevice, |
| const StreetMapProjection & | map ) |
Definition at line 95 of file TurnByTurn.cpp.
| TurnByTurn::Direction TurnByTurn::GetDirection | ( | float | bearing | ) | const |
Definition at line 214 of file TurnByTurn.cpp.
|
staticprivate |
Definition at line 271 of file TurnByTurn.cpp.
| float TurnByTurn::GetHeadingToNextNode | ( | ) | const |
| void TurnByTurn::ReleaseResources | ( | ) |
|
private |
Definition at line 199 of file TurnByTurn.cpp.
|
private |
Definition at line 285 of file TurnByTurn.cpp.
| void TurnByTurn::Update | ( | bool | pIsGrndVehicle, |
| float | pElasedTime ) |
Definition at line 17 of file TurnByTurn.cpp.
| void TurnByTurn::UpdateVB | ( | const StreetMapProjection & | map | ) |
Definition at line 161 of file TurnByTurn.cpp.
|
staticprivate |
|
private |
Definition at line 11 of file TurnByTurn.h.
|
private |
Definition at line 20 of file TurnByTurn.h.
|
private |
Definition at line 19 of file TurnByTurn.h.
|
private |
Definition at line 12 of file TurnByTurn.h.
|
private |
Definition at line 14 of file TurnByTurn.h.
|
private |
Definition at line 13 of file TurnByTurn.h.
|
private |
Definition at line 17 of file TurnByTurn.h.
|
private |
Definition at line 18 of file TurnByTurn.h.
|
private |
Definition at line 16 of file TurnByTurn.h.