HoloLens 2 Gait Training
The purpose of this project is to create gait training application.
Loading...
Searching...
No Matches
BaseNoiseClass Class Referenceabstract
Inheritance diagram for BaseNoiseClass:
Inheritance graph
Collaboration diagram for BaseNoiseClass:
Collaboration graph

Public Member Functions

abstract void ApplyPattern ()
 Calculate the noise according to the user input. Mapped to NoiseDataPanel ApplyPattern button. More...
 
virtual void GenerateNewDistribution ()
 Generate a new normal(Gaussian) distribution Mapped to NoiseDataPanel NewDistribution button. More...
 
virtual void CanclePattern ()
 Cancel the current noise pattern and reset it with default speed. Mapped to NoiseDataPanel CancelPattern button. More...
 

Protected Member Functions

virtual void Awake ()
 When invoke the scripts performas all the initializations including, Lists, scripts, and noise scaling values such as standard distribution and mean. More...
 
void InitializeNoiseDataPanelObjects ()
 Cache the references of NoiseDataPanel gameobjects. More...
 
double GetStandardDeviation (ref List< float > basePinkNoiseList)
 This function calculate the sample Standard Deviation value and return it. More...
 
void ConvertToZScore (ref List< float > basePinkNoiseList)
 This converts Z values to Z Score values. May get off a small amount due to round error. More...
 
abstract void CalculateNoise ()
 Calculate the colored noise More...
 
abstract void CalculateBaseNoise ()
 Calculate the base colored noise More...
 
void SetReadyMessage (bool flag, string lbl)
 Indicate noise is successgully applied or not. More...
 
double ExtractDecimalFromUI (string textFromUI)
 Get the number part from the UI textfields. More...
 
virtual void SetUITextVisibility ()
 Change the visibility of the text fields according to the noise patterns. More...
 
virtual void PopulateVariablesWithDataFromUI ()
 Populate data variables used to alter noise. The data are gained through UI lables which are set by the keyboard input. More...
 

Protected Attributes

float m_MeanPeriod = 1.0f
 Hold the Mean Period Value. More...
 
float m_SDPeriod = 2.0f
 Hold the standard distribution period. More...
 
float m_Multiplier = 0.0f
 Used this as a multiplier to calculate pink noise. More...
 
int m_SampleSize = 5000
 Defines how many samples we want. More...
 
GaussianDistribution m_GaussianDistribution
 Reference to GaussianDistribution script. More...
 
bool m_NoiseAppliedFlag = false
 This flag will indicate we applied or cancel the noise to animations. More...
 
float m_PreferredWalkingSpeed = m_DefaultISOWalkSpeed
 Hold the user's preferred walking speed. More...
 
List< float > m_NoiseValueList = null
 This list stores the calculated colored noise values. More...
 
List< float > m_StandardNoiseDistribution = null
 A List to hold Normal(Gaussian) distribution. More...
 
TextMeshPro m_MeanPeriodLabel
 We get the value from these text labels. More...
 
TextMeshPro m_SDPeriodLabel
 
TextMeshPro m_SampleSizeLabel
 
TextMeshPro m_PreferredSpeedLabel
 
TextMeshPro m_CurrentPattern
 
TextMeshPro m_Title
 
GameObject m_ApplyButton
 
GameObject m_DistributionButton
 

Static Protected Attributes

const float m_Mean = 0.0f
 Hold the Mean value. More...
 
const float m_NoiseSTD = 1.0f
 Hold the standard distribution. More...
 
const float m_DefaultISOWalkSpeed = -1.0f
 Default ISO preferred walking speed. More...
 

Properties

List< float > NoiseValueList [get]
 Property to get colored noise distribution (Read-Only) More...
 
bool NoiseAppliedFlag [get]
 Property to get noise applied flag (Read-Only) More...
 
TextMeshPro CurrentPattern [get]
 Property to get the current noise in use (Read-Only) More...
 
float PreferredWalkingSpeed [get]
 Property to get user's preferred walking speed (Read-Only) More...
 
List< float > NoiseDistribution [get]
 Property to get standard normal(Gaussian) distribution (Read-Only) More...
 

Private Attributes

GameObject m_NoiseDataPanel = null
 Reference to NoiseDataPanel UI. More...
 

Detailed Description

Definition at line 9 of file BaseNoiseClass.cs.

Member Function Documentation

◆ ApplyPattern()

abstract void BaseNoiseClass.ApplyPattern ( )
pure virtual

Calculate the noise according to the user input. Mapped to NoiseDataPanel ApplyPattern button.

Implemented in ISONoise, PinkNoise, and WhiteNoise.

Here is the caller graph for this function:

◆ Awake()

virtual void BaseNoiseClass.Awake ( )
inlineprotectedvirtual

When invoke the scripts performas all the initializations including, Lists, scripts, and noise scaling values such as standard distribution and mean.

Reimplemented in ISONoise, PinkNoise, and WhiteNoise.

Definition at line 93 of file BaseNoiseClass.cs.

Here is the call graph for this function:

◆ CalculateBaseNoise()

abstract void BaseNoiseClass.CalculateBaseNoise ( )
protectedpure virtual

Calculate the base colored noise

Implemented in ISONoise, PinkNoise, and WhiteNoise.

◆ CalculateNoise()

abstract void BaseNoiseClass.CalculateNoise ( )
protectedpure virtual

Calculate the colored noise

Implemented in ISONoise, PinkNoise, and WhiteNoise.

◆ CanclePattern()

virtual void BaseNoiseClass.CanclePattern ( )
inlinevirtual

Cancel the current noise pattern and reset it with default speed. Mapped to NoiseDataPanel CancelPattern button.

Reimplemented in ISONoise.

Definition at line 197 of file BaseNoiseClass.cs.

Here is the caller graph for this function:

◆ ConvertToZScore()

void BaseNoiseClass.ConvertToZScore ( ref List< float >  basePinkNoiseList)
inlineprotected

This converts Z values to Z Score values. May get off a small amount due to round error.

Parameters
basePinkNoiseList

Definition at line 156 of file BaseNoiseClass.cs.

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

◆ ExtractDecimalFromUI()

double BaseNoiseClass.ExtractDecimalFromUI ( string  textFromUI)
inlineprotected

Get the number part from the UI textfields.

Parameters
textFromUI
Returns

Definition at line 241 of file BaseNoiseClass.cs.

Here is the caller graph for this function:

◆ GenerateNewDistribution()

virtual void BaseNoiseClass.GenerateNewDistribution ( )
inlinevirtual

Generate a new normal(Gaussian) distribution Mapped to NoiseDataPanel NewDistribution button.

Reimplemented in PinkNoise, and WhiteNoise.

Definition at line 188 of file BaseNoiseClass.cs.

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

◆ GetStandardDeviation()

double BaseNoiseClass.GetStandardDeviation ( ref List< float >  basePinkNoiseList)
inlineprotected

This function calculate the sample Standard Deviation value and return it.

Parameters
basePinkNoiseList
Returns
Sample Standard Deviation

Definition at line 131 of file BaseNoiseClass.cs.

Here is the caller graph for this function:

◆ InitializeNoiseDataPanelObjects()

void BaseNoiseClass.InitializeNoiseDataPanelObjects ( )
inlineprotected

Cache the references of NoiseDataPanel gameobjects.

Definition at line 106 of file BaseNoiseClass.cs.

Here is the caller graph for this function:

◆ PopulateVariablesWithDataFromUI()

virtual void BaseNoiseClass.PopulateVariablesWithDataFromUI ( )
inlineprotectedvirtual

Populate data variables used to alter noise. The data are gained through UI lables which are set by the keyboard input.

Reimplemented in PinkNoise.

Definition at line 270 of file BaseNoiseClass.cs.

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

◆ SetReadyMessage()

void BaseNoiseClass.SetReadyMessage ( bool  flag,
string  lbl 
)
inlineprotected

Indicate noise is successgully applied or not.

Parameters
flagIndicate noise applied or not.
lblIndicate the type of noise.

Definition at line 222 of file BaseNoiseClass.cs.

Here is the caller graph for this function:

◆ SetUITextVisibility()

virtual void BaseNoiseClass.SetUITextVisibility ( )
inlineprotectedvirtual

Change the visibility of the text fields according to the noise patterns.


Reimplemented in ISONoise.

Definition at line 258 of file BaseNoiseClass.cs.

Here is the caller graph for this function:

Field Documentation

◆ m_ApplyButton

GameObject BaseNoiseClass.m_ApplyButton
protected

Definition at line 65 of file BaseNoiseClass.cs.

◆ m_CurrentPattern

TextMeshPro BaseNoiseClass.m_CurrentPattern
protected

Definition at line 62 of file BaseNoiseClass.cs.

◆ m_DefaultISOWalkSpeed

const float BaseNoiseClass.m_DefaultISOWalkSpeed = -1.0f
staticprotected

Default ISO preferred walking speed.

Definition at line 46 of file BaseNoiseClass.cs.

◆ m_DistributionButton

GameObject BaseNoiseClass.m_DistributionButton
protected

Definition at line 66 of file BaseNoiseClass.cs.

◆ m_GaussianDistribution

GaussianDistribution BaseNoiseClass.m_GaussianDistribution
protected

Reference to GaussianDistribution script.

Definition at line 40 of file BaseNoiseClass.cs.

◆ m_Mean

const float BaseNoiseClass.m_Mean = 0.0f
staticprotected

Hold the Mean value.

Definition at line 22 of file BaseNoiseClass.cs.

◆ m_MeanPeriod

float BaseNoiseClass.m_MeanPeriod = 1.0f
protected

Hold the Mean Period Value.

Definition at line 28 of file BaseNoiseClass.cs.

◆ m_MeanPeriodLabel

TextMeshPro BaseNoiseClass.m_MeanPeriodLabel
protected

We get the value from these text labels.

Definition at line 58 of file BaseNoiseClass.cs.

◆ m_Multiplier

float BaseNoiseClass.m_Multiplier = 0.0f
protected

Used this as a multiplier to calculate pink noise.

Definition at line 34 of file BaseNoiseClass.cs.

◆ m_NoiseAppliedFlag

bool BaseNoiseClass.m_NoiseAppliedFlag = false
protected

This flag will indicate we applied or cancel the noise to animations.

Definition at line 43 of file BaseNoiseClass.cs.

◆ m_NoiseDataPanel

GameObject BaseNoiseClass.m_NoiseDataPanel = null
private

Reference to NoiseDataPanel UI.

Definition at line 15 of file BaseNoiseClass.cs.

◆ m_NoiseSTD

const float BaseNoiseClass.m_NoiseSTD = 1.0f
staticprotected

Hold the standard distribution.

Definition at line 25 of file BaseNoiseClass.cs.

◆ m_NoiseValueList

List<float> BaseNoiseClass.m_NoiseValueList = null
protected

This list stores the calculated colored noise values.

Definition at line 52 of file BaseNoiseClass.cs.

◆ m_PreferredSpeedLabel

TextMeshPro BaseNoiseClass.m_PreferredSpeedLabel
protected

Definition at line 61 of file BaseNoiseClass.cs.

◆ m_PreferredWalkingSpeed

float BaseNoiseClass.m_PreferredWalkingSpeed = m_DefaultISOWalkSpeed
protected

Hold the user's preferred walking speed.

Definition at line 49 of file BaseNoiseClass.cs.

◆ m_SampleSize

int BaseNoiseClass.m_SampleSize = 5000
protected

Defines how many samples we want.

Definition at line 37 of file BaseNoiseClass.cs.

◆ m_SampleSizeLabel

TextMeshPro BaseNoiseClass.m_SampleSizeLabel
protected

Definition at line 60 of file BaseNoiseClass.cs.

◆ m_SDPeriod

float BaseNoiseClass.m_SDPeriod = 2.0f
protected

Hold the standard distribution period.

Definition at line 31 of file BaseNoiseClass.cs.

◆ m_SDPeriodLabel

TextMeshPro BaseNoiseClass.m_SDPeriodLabel
protected

Definition at line 59 of file BaseNoiseClass.cs.

◆ m_StandardNoiseDistribution

List<float> BaseNoiseClass.m_StandardNoiseDistribution = null
protected

A List to hold Normal(Gaussian) distribution.

Definition at line 55 of file BaseNoiseClass.cs.

◆ m_Title

TextMeshPro BaseNoiseClass.m_Title
protected

Definition at line 63 of file BaseNoiseClass.cs.

Property Documentation

◆ CurrentPattern

TextMeshPro BaseNoiseClass.CurrentPattern
get

Property to get the current noise in use (Read-Only)

Definition at line 79 of file BaseNoiseClass.cs.

◆ NoiseAppliedFlag

bool BaseNoiseClass.NoiseAppliedFlag
get

Property to get noise applied flag (Read-Only)

Definition at line 76 of file BaseNoiseClass.cs.

◆ NoiseDistribution

List<float> BaseNoiseClass.NoiseDistribution
get

Property to get standard normal(Gaussian) distribution (Read-Only)

Definition at line 85 of file BaseNoiseClass.cs.

◆ NoiseValueList

List<float> BaseNoiseClass.NoiseValueList
get

Property to get colored noise distribution (Read-Only)

Definition at line 73 of file BaseNoiseClass.cs.

◆ PreferredWalkingSpeed

float BaseNoiseClass.PreferredWalkingSpeed
get

Property to get user's preferred walking speed (Read-Only)

Definition at line 82 of file BaseNoiseClass.cs.


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