HoloLens 2 Gait Training
The purpose of this project is to create gait training application.
|
This class is used to control the avartar animation state. More...
Public Member Functions | |
void | ResetAnimationLengthList () |
Called after user click cancel pattern button in Noise UI. More... | |
Properties | |
List< float > | AnimationLength [get] |
Property to get the Animation length (Read-Only) More... | |
Private Member Functions | |
void | Awake () |
Gets called first when script is invoked Cached the references to Animator, SetNoise and NoiseDataPanelTitle More... | |
void | Start () |
Cached a reference to ScaledNoisePatterns class. More... | |
void | Update () |
Gets called per each frame The CamMovementTracker singleton instance has speed and IsMoving Flags. When we are moving, we checked the noise pattern. By default it use pink noise. If user didn't add SD or mean, it use 1 as the default time to complete the animation( one gait cycle). Otherwise, it shrinks or expands the time to complete the gait animation cycle. More... | |
void | ApplyCorrectNoisePattern () |
Get the calculated noise pattern and apply that to animation speed. This noise will shrink or expand the time to complete the gait animation cycle. More... | |
void | ResetNoiseAfterEnd (int noiseLength, string lbl) |
When we reached to the end of the colred noise list, we looped back to the beginning. More... | |
void | OpenConfirmationDialogMedium () |
Opens confirmation dialog example More... | |
void | RunGaitCycle () |
Expand and Shrink gait cycle animation The completion time of animation is the value of pink or white noise. More... | |
void | StoreAnimationClipsLength () |
Store the original animation clips values in a dictionary. More... | |
void | LockdownAnimation () |
Lockdown the animation until it played out. Animation will unlock after it complete the current loop. This event is mapped to animation event. More... | |
void | UnlockAnimation () |
Unlock the animation after it played out. Mapped to animation event. More... | |
Private Attributes | |
Animator | m_Animator |
Reference to the animator More... | |
SetNoise | m_SetNoise |
Reference to the SetNoise Script. More... | |
NoiseController | m_NoiseController |
Reference to NoiseController class. More... | |
int | m_NoiseIndex |
Noise index for traveling the noise list. At the end of the travel, it will be reset to 0. More... | |
TextMeshPro | m_NoiseDataPanelTitle |
This is also use as an error message display and current noise display. More... | |
string | m_NoisePatternLbl = "Pink" |
To identify the current noise pattern. More... | |
bool | m_IsAnimationLocked = false |
This flag is used to lock down the animation till it played out. More... | |
GameObject | m_DialogPrefabMedium = null |
UI confirmation pop-up panel. More... | |
bool | m_IdleElementFlag = false |
When Avatar goes to Idle, m_NoiseIndex will increment by 1. This will omit the next noise value from applying. We use this flag to prevent values being ommitted without applying. More... | |
int | m_Counter = 1 |
Use to apply previous noise after changing idle to moving. More... | |
List< float > | m_AnimationLength = null |
This list stores timestamps of the animation length of the gait cycle. More... | |
Dictionary< string, float > | m_OriginalAnimationLength |
This stores the length of the original gait cycle animations. More... | |
Static Private Attributes | |
const float | m_DefaultAnimationSpeed = 1.0f |
Default value of animation speed. More... | |
This class is used to control the avartar animation state.
Definition at line 11 of file AvatarAnimationState.cs.
|
inlineprivate |
Get the calculated noise pattern and apply that to animation speed. This noise will shrink or expand the time to complete the gait animation cycle.
Definition at line 117 of file AvatarAnimationState.cs.
|
inlineprivate |
Gets called first when script is invoked Cached the references to Animator, SetNoise and NoiseDataPanelTitle
Definition at line 65 of file AvatarAnimationState.cs.
|
inlineprivate |
Lockdown the animation until it played out. Animation will unlock after it complete the current loop. This event is mapped to animation event.
Definition at line 245 of file AvatarAnimationState.cs.
|
inlineprivate |
Opens confirmation dialog example
Definition at line 160 of file AvatarAnimationState.cs.
|
inline |
Called after user click cancel pattern button in Noise UI.
Definition at line 288 of file AvatarAnimationState.cs.
|
inlineprivate |
When we reached to the end of the colred noise list, we looped back to the beginning.
Definition at line 146 of file AvatarAnimationState.cs.
|
inlineprivate |
Expand and Shrink gait cycle animation The completion time of animation is the value of pink or white noise.
Definition at line 171 of file AvatarAnimationState.cs.
|
inlineprivate |
Cached a reference to ScaledNoisePatterns class.
Definition at line 77 of file AvatarAnimationState.cs.
|
inlineprivate |
Store the original animation clips values in a dictionary.
Definition at line 214 of file AvatarAnimationState.cs.
|
inlineprivate |
Unlock the animation after it played out. Mapped to animation event.
Definition at line 257 of file AvatarAnimationState.cs.
|
inlineprivate |
Gets called per each frame The CamMovementTracker singleton instance has speed and IsMoving Flags. When we are moving, we checked the noise pattern. By default it use pink noise. If user didn't add SD or mean, it use 1 as the default time to complete the animation( one gait cycle). Otherwise, it shrinks or expands the time to complete the gait animation cycle.
Definition at line 91 of file AvatarAnimationState.cs.
|
private |
This list stores timestamps of the animation length of the gait cycle.
Definition at line 53 of file AvatarAnimationState.cs.
|
private |
Reference to the animator
Definition at line 15 of file AvatarAnimationState.cs.
|
private |
Use to apply previous noise after changing idle to moving.
Definition at line 50 of file AvatarAnimationState.cs.
|
staticprivate |
Default value of animation speed.
Definition at line 38 of file AvatarAnimationState.cs.
|
private |
UI confirmation pop-up panel.
Definition at line 41 of file AvatarAnimationState.cs.
|
private |
When Avatar goes to Idle, m_NoiseIndex will increment by 1. This will omit the next noise value from applying. We use this flag to prevent values being ommitted without applying.
Definition at line 47 of file AvatarAnimationState.cs.
|
private |
This flag is used to lock down the animation till it played out.
Definition at line 35 of file AvatarAnimationState.cs.
|
private |
Reference to NoiseController class.
Definition at line 21 of file AvatarAnimationState.cs.
|
private |
This is also use as an error message display and current noise display.
Definition at line 29 of file AvatarAnimationState.cs.
|
private |
Noise index for traveling the noise list. At the end of the travel, it will be reset to 0.
Definition at line 25 of file AvatarAnimationState.cs.
|
private |
To identify the current noise pattern.
Definition at line 32 of file AvatarAnimationState.cs.
|
private |
This stores the length of the original gait cycle animations.
Definition at line 56 of file AvatarAnimationState.cs.
|
private |
Reference to the SetNoise Script.
Definition at line 18 of file AvatarAnimationState.cs.
|
get |
Property to get the Animation length (Read-Only)
Definition at line 59 of file AvatarAnimationState.cs.