1using Microsoft.MixedReality.Toolkit.UI;
24 base.GenerateNewDistribution();
35 bool noiseAppliedState = ( m_NoiseValueList.Count >=
m_SampleSize ) ?
true :
false;
57 m_Title.text =
"Distribution is Ready";
61 m_Title.text =
"Distribution is NOT Ready";
virtual void PopulateVariablesWithDataFromUI()
Populate data variables used to alter noise. The data are gained through UI lables which are set by t...
const float m_NoiseSTD
Hold the standard distribution.
float m_MeanPeriod
Hold the Mean Period Value.
void ConvertToZScore(ref List< float > basePinkNoiseList)
This converts Z values to Z Score values. May get off a small amount due to round error.
List< float > m_StandardNoiseDistribution
A List to hold Normal(Gaussian) distribution.
int m_SampleSize
Defines how many samples we want.
float m_SDPeriod
Hold the standard distribution period.
List< float > m_NoiseValueList
This list stores the calculated colored noise values.
float m_Multiplier
Used this as a multiplier to calculate pink noise.
const float m_Mean
Hold the Mean value.
void SetReadyMessage(bool flag, string lbl)
Indicate noise is successgully applied or not.
GaussianDistribution m_GaussianDistribution
Reference to GaussianDistribution script.
double RandomGauss(double mu=0, double sigma=1)
Obtains normally (Gaussian) distrubuted random numbers, using the Box-Muller transformation....
Handle the Random (White) Noise.
override void Awake()
Extend the base class initializations.
override void GenerateNewDistribution()
Generate a new normal(Gaussian) distribution Mapped to NoiseDataPanel NewDistribution button.
override void CalculateNoise()
Scale the base Random/White noise.
override void ApplyPattern()
Calculate the noise according to the user input. Mapped to NoiseDataPanel ApplyPattern button.
override void CalculateBaseNoise()
Calculate the white/random noise.