public class UserTracker extends java.lang.Object implements OrientationManager.OnChangedListener
| Constructor and Description |
|---|
UserTracker(SpeechSubmitHandler speechSubmitHandler,
java.util.List<GridNode> path,
double zoneOffset,
double destOffset,
OrientationManager orientationManager,
IndicatorView indicatorView,
Building building)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
RectCoordinates |
getLatestLocation()
Getter for the latest location of the user
|
GridNode |
getNextNode()
Getter for the next node in the path
|
GridNode |
getPreviousNode()
Getter for the previous node the user passed in the path
|
UserState |
getUserState()
Getter for the users state
|
void |
onAccuracyChanged(OrientationManager orientationManager)
Called when the accuracy of the compass changes.
|
void |
onLocationChanged(OrientationManager orientationManager)
Called when the user's location changes.
|
void |
onOrientationChanged(OrientationManager orientationManager)
Called when the user's orientation changes.
|
void |
setPath(java.util.List<GridNode> path)
Sets the path being used by the user tracker
|
void |
updateUserState(RectCoordinates userLocation)
Updates the state of the user according to the given location
|
public UserTracker(SpeechSubmitHandler speechSubmitHandler, java.util.List<GridNode> path, double zoneOffset, double destOffset, OrientationManager orientationManager, IndicatorView indicatorView, Building building)
speechSubmitHandler - SpeechSubmitHandler used throughout the classpath - Path which the user is expected to followzoneOffset - Offset being used to create the zonesdestOffset - Offest being used for the destinations and waypointsorientationManager - OrientationManager used to get sensor dataindicatorView - IndicatorView being displayed to the userbuilding - Building the user is currently inpublic void updateUserState(RectCoordinates userLocation)
userLocation - New location for the userpublic void onAccuracyChanged(OrientationManager orientationManager)
OrientationManager.OnChangedListeneronAccuracyChanged in interface OrientationManager.OnChangedListenerorientationManager - the orientation manager that detected the changepublic void onLocationChanged(OrientationManager orientationManager)
OrientationManager.OnChangedListeneronLocationChanged in interface OrientationManager.OnChangedListenerorientationManager - the orientation manager that detected the changepublic void onOrientationChanged(OrientationManager orientationManager)
OrientationManager.OnChangedListeneronOrientationChanged in interface OrientationManager.OnChangedListenerorientationManager - the orientation manager that detected the changepublic UserState getUserState()
public RectCoordinates getLatestLocation()
public GridNode getPreviousNode()
public GridNode getNextNode()
public void setPath(java.util.List<GridNode> path)
path - new path for the usertracker