HoloLens 2 Gait Training
The purpose of this project is to create gait training application.
Loading...
Searching...
No Matches
CamMovementTracker Class Reference

A singleton Instance to track Camera Movements This will also calculate distance, rotation and speed (Km/h). More...

Inheritance diagram for CamMovementTracker:
Inheritance graph
Collaboration diagram for CamMovementTracker:
Collaboration graph

Properties

static CamMovementTracker m_CamTrackerInstance [get, private set]
 Singleton Instance We have 1 Camera instance and 1 User at all time. Therefore, I believe Singleton is useful in this case. More...
 
float Speed [get, private set]
 Property to get and set Speed. More...
 
float RotationDelta [get, private set]
 Property to get and set RotationDelta. More...
 
float Distance [get, private set]
 Property to get and set Distance. More...
 
bool IsMoving [get, private set]
 Property to get and set IsMoving flag. More...
 

Private Member Functions

void Awake ()
 If there is an instance, and it is not me, delete myself. More...
 
void Start ()
 Start is called before the first frame update. More...
 
void Update ()
 Update is called once per frame. More...
 
float CalculateDistanceCovered ()
 Calculate Distance More...
 
float CalculateSpeed ()
 Calculate Speed in killo meters per hour. More...
 
float CalculateRotation ()
 Calculate the rotations. More...
 
bool IsCameraMoving (float speed)
 Calculate whether the player is moving or not. More...
 

Private Attributes

readonly float m_SampleTime = 1.0f
 Just a default value to compare against. More...
 
Vector3 m_LastSampleLocation
 Holds last location value
More...
 
Quaternion m_LastSampleRotation
 Holds last rotation value. More...
 
float m_LastSampleTime
 Holds last timestamp value. More...
 

Detailed Description

A singleton Instance to track Camera Movements This will also calculate distance, rotation and speed (Km/h).

Definition at line 10 of file CamMovementTracker.cs.

Member Function Documentation

◆ Awake()

void CamMovementTracker.Awake ( )
inlineprivate

If there is an instance, and it is not me, delete myself.

Definition at line 47 of file CamMovementTracker.cs.

◆ CalculateDistanceCovered()

float CamMovementTracker.CalculateDistanceCovered ( )
inlineprivate

Calculate Distance

Definition at line 86 of file CamMovementTracker.cs.

Here is the caller graph for this function:

◆ CalculateRotation()

float CamMovementTracker.CalculateRotation ( )
inlineprivate

Calculate the rotations.

Definition at line 102 of file CamMovementTracker.cs.

Here is the caller graph for this function:

◆ CalculateSpeed()

float CamMovementTracker.CalculateSpeed ( )
inlineprivate

Calculate Speed in killo meters per hour.

Definition at line 94 of file CamMovementTracker.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsCameraMoving()

bool CamMovementTracker.IsCameraMoving ( float  speed)
inlineprivate

Calculate whether the player is moving or not.

Definition at line 110 of file CamMovementTracker.cs.

Here is the caller graph for this function:

◆ Start()

void CamMovementTracker.Start ( )
inlineprivate

Start is called before the first frame update.

Definition at line 60 of file CamMovementTracker.cs.

◆ Update()

void CamMovementTracker.Update ( )
inlineprivate

Update is called once per frame.

Definition at line 68 of file CamMovementTracker.cs.

Here is the call graph for this function:

Field Documentation

◆ m_LastSampleLocation

Vector3 CamMovementTracker.m_LastSampleLocation
private

Holds last location value

Definition at line 24 of file CamMovementTracker.cs.

◆ m_LastSampleRotation

Quaternion CamMovementTracker.m_LastSampleRotation
private

Holds last rotation value.

Definition at line 27 of file CamMovementTracker.cs.

◆ m_LastSampleTime

float CamMovementTracker.m_LastSampleTime
private

Holds last timestamp value.

Definition at line 30 of file CamMovementTracker.cs.

◆ m_SampleTime

readonly float CamMovementTracker.m_SampleTime = 1.0f
private

Just a default value to compare against.

Definition at line 21 of file CamMovementTracker.cs.

Property Documentation

◆ Distance

float CamMovementTracker.Distance
getprivate set

Property to get and set Distance.

Definition at line 39 of file CamMovementTracker.cs.

◆ IsMoving

bool CamMovementTracker.IsMoving
getprivate set

Property to get and set IsMoving flag.

Definition at line 42 of file CamMovementTracker.cs.

◆ m_CamTrackerInstance

CamMovementTracker CamMovementTracker.m_CamTrackerInstance
staticgetprivate set

Singleton Instance We have 1 Camera instance and 1 User at all time. Therefore, I believe Singleton is useful in this case.

Definition at line 17 of file CamMovementTracker.cs.

◆ RotationDelta

float CamMovementTracker.RotationDelta
getprivate set

Property to get and set RotationDelta.

Definition at line 36 of file CamMovementTracker.cs.

◆ Speed

float CamMovementTracker.Speed
getprivate set

Property to get and set Speed.

Definition at line 33 of file CamMovementTracker.cs.


The documentation for this class was generated from the following file: