VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtSoundscape::Varying Struct Reference

Detailed Description

Handles automatic variation of a floating point value (like volume or pitch) within a specified range and over varying durations.

#include <soundscape.h>

Public Member Functions

void reset ()
 
void update (double dt)
 

Public Attributes

float currentVal
 
float duration
 
float rate
 
float minVal
 
float maxVal
 
float minTime
 
float maxTime
 

Member Function Documentation

◆ reset()

void makVre::DtSoundscape::Varying::reset ( )

Resets the variation with a new random target value and duration.

Selects a new random target value between minVal and maxVal and calculates the rate of change needed to reach that value over a random duration between minTime and maxTime.

◆ update()

void makVre::DtSoundscape::Varying::update ( double dt)

Updates the current value based on elapsed time.

Parameters
dtTime elapsed since last update in seconds

Applies the current rate of change to the current value and resets if the duration has elapsed.

Member Data Documentation

◆ currentVal

float makVre::DtSoundscape::Varying::currentVal

Current value of the parameter.

◆ duration

float makVre::DtSoundscape::Varying::duration

Time remaining until next value change (seconds)

◆ rate

float makVre::DtSoundscape::Varying::rate

Rate of change per second toward target value.

◆ minVal

float makVre::DtSoundscape::Varying::minVal

Minimum allowed value.

◆ maxVal

float makVre::DtSoundscape::Varying::maxVal

Maximum allowed value.

◆ minTime

float makVre::DtSoundscape::Varying::minTime

Minimum time between value changes (seconds)

◆ maxTime

float makVre::DtSoundscape::Varying::maxTime

Maximum time between value changes (seconds)


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