34 float Sample(
float t)
const;
44 void SetValues(
float v0,
float v1,
float v2,
float v3);
An Attack/Sustain/Release envelope curve class with optional sine/cosine modulation.
Definition envelopecurve.h:20
float limits[2]
Definition envelopecurve.h:72
EnvelopeCurve()
default constructor
Definition envelopecurve.cc:15
const float * GetValues() const
get values
Definition envelopecurve.h:84
float keyPos1
Definition envelopecurve.h:74
void Setup(float val0, float val1, float val2, float val3, float keyPos0, float keyPos1, float freq, float amp, ModFunc mod)
set parameters
Definition envelopecurve.cc:35
void SetKeyPos0(float f)
set keypos0
Definition envelopecurve.h:114
const float GetFrequency() const
get frequency
Definition envelopecurve.h:141
void SetModFunc(int func)
set mod function
Definition envelopecurve.h:186
const float GetKeyPos0() const
get keypos0
Definition envelopecurve.h:105
const float GetKeyPos1() const
get keypos1
Definition envelopecurve.h:123
const float GetAmplitude() const
get amplitude
Definition envelopecurve.h:159
float keyPos0
Definition envelopecurve.h:73
ModFunc
modulation enumerator
Definition envelopecurve.h:24
@ Cosine
Definition envelopecurve.h:26
@ Sine
Definition envelopecurve.h:25
float amplitude
Definition envelopecurve.h:76
void SetFrequency(float f)
set frequency
Definition envelopecurve.h:150
const float * GetLimits() const
get limits in y
Definition envelopecurve.h:196
void PreSample(float *sampleBuffer, SizeT numSamples, SizeT sampleStride) const
sample from t=0 to t=1 into array of values
Definition envelopecurve.cc:91
float GetMaxValue() const
get the max of val0, val1, val2, val3
Definition envelopecurve.cc:109
const int GetModFunc() const
get modFunction
Definition envelopecurve.h:177
float GetMinValue() const
get the min of val0, v1l, val2, val3
Definition envelopecurve.cc:118
void SetLimits(float min, float max)
set limits in y
Definition envelopecurve.h:205
float frequency
Definition envelopecurve.h:75
float Sample(float t) const
sample at specific time (0..1)
Definition envelopecurve.cc:54
float values[4]
Definition envelopecurve.h:71
void SetKeyPos1(float f)
set keypos1
Definition envelopecurve.h:132
void SetAmplitude(float f)
set amplitude
Definition envelopecurve.h:168
void SetValues(float v0, float v1, float v2, float v3)
set values
Definition envelopecurve.h:93
ModFunc modFunction
Definition envelopecurve.h:77
__forceinline TYPE min(TYPE a, TYPE b)
Definition scalar.h:390
__forceinline TYPE max(TYPE a, TYPE b)
Definition scalar.h:359
Particle context controls playing and enabling/disabling of particle emitters inside a model.
Definition modelnode.h:37
Nebula's scalar datatype.
int SizeT
Definition types.h:49