Runner's High
Public Attributes | Protected Member Functions | List of all members
Accel.StepDetector Class Reference

A modified version of the StateDetector that fires events when footsteps occur. More...

Inheritance diagram for Accel.StepDetector:
Accel.StateDetector Accel.DataOutput< float > Accel.StateOutput Accel.DataInput< float >

Public Attributes

bool predict = true
 Toggle step prediciton. More...
 
float fixedPredictionOffset = 0
 The offset that is applied to predictions. Usually you want to account for audio delays etc, so negative values are usual. More...
 
float variablePredictionOffset = 1
 
float maxPredictedStepTime = 2
 A step that takes longer than this value is considered a false prediction. More...
 
float minPredictedStepTime = 0.1f
 A step that takes shorter than this value is considered a false prediction. More...
 
float numStepsForAveraging = 1
 The nubmer of steps taken into account to calculate the average step duration. More...
 
float lastStepTimestamp
 The time of occurence the last step. More...
 
float lastStepDuration
 The duration of the last step. More...
 
float averageStepDuration
 The average step duration. More...
 
int stepCount
 The number of steps counted since Scene start. More...
 
float elapsed
 The elapsed time since Scene start. More...
 
- Public Attributes inherited from Accel.StateDetector
List< float > OnThresholds = new List<float>()
 
List< float > OffThresholds = new List<float>()
 
float minTriggerTime = 0
 The minimum time between subsequent triggers. Can be handy to prevent false triggers. More...
 
int onCount = 0
 How many times the detector switched to on since Scene start. More...
 

Protected Member Functions

new unsafe void Update ()
 
- Protected Member Functions inherited from Accel.StateDetector
unsafe void Update ()
 

Additional Inherited Members

- Public Member Functions inherited from Accel.StateDetector
void AddInputVal (DataOutput< float > input, float onThreshold=1, float offThreshold=0)
 Add an input to the StateDetector. More...
 
- Protected Attributes inherited from Accel.StateDetector
List< DataOutput< float > > inputs = new List<DataOutput<float>>()
 
bool on
 
float floatState = 0
 
- Properties inherited from Accel.StateDetector
DataOutput< float > InputVal [get, set]
 The object this instance gets its data from. Must be of type DataOuput. Deletes all other inputs that are currently assigned.
 
float OnThreshold [get, set]
 The OnThreshold (if only 1 input is assigned), or the OnThreshold of the first input (if multiple inputs are assigned) More...
 
float OffThreshold [get, set]
 The OffThreshold (if only 1 input is assigned), or the OffThreshold of the first input (if multiple inputs are assigned) More...
 
bool off [get, set]
 
bool On [get]
 The current state of the detector.
 
float Val [get]
 The current state of the detector, converted to float.
 
- Properties inherited from Accel.DataOutput< float >
Val [get]
 The current output calue.
 
- Properties inherited from Accel.StateOutput
bool On [get]
 
- Properties inherited from Accel.DataInput< float >
DataOutput< T > InputVal [get, set]
 

Detailed Description

A modified version of the StateDetector that fires events when footsteps occur.

Member Data Documentation

◆ averageStepDuration

float Accel.StepDetector.averageStepDuration

The average step duration.

◆ elapsed

float Accel.StepDetector.elapsed

The elapsed time since Scene start.

◆ fixedPredictionOffset

float Accel.StepDetector.fixedPredictionOffset = 0

The offset that is applied to predictions. Usually you want to account for audio delays etc, so negative values are usual.

◆ lastStepDuration

float Accel.StepDetector.lastStepDuration

The duration of the last step.

◆ lastStepTimestamp

float Accel.StepDetector.lastStepTimestamp

The time of occurence the last step.

◆ maxPredictedStepTime

float Accel.StepDetector.maxPredictedStepTime = 2

A step that takes longer than this value is considered a false prediction.

◆ minPredictedStepTime

float Accel.StepDetector.minPredictedStepTime = 0.1f

A step that takes shorter than this value is considered a false prediction.

◆ numStepsForAveraging

float Accel.StepDetector.numStepsForAveraging = 1

The nubmer of steps taken into account to calculate the average step duration.

◆ predict

bool Accel.StepDetector.predict = true

Toggle step prediciton.

◆ stepCount

int Accel.StepDetector.stepCount

The number of steps counted since Scene start.


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