Classempathy::pure_math::Wave
pure_math
Subclasses
Constructors
Member Functions

Classempathy::pure_math::Wave

A basic transverse wave.

This wave has the following characteristics:

frequency, wavelength, speed. Regarding distance, the openGL screen measures a distance of 2.0 unit. Both in x and y axes.

damping constant: an exponential function that decays the amplitude by distance BUT NOT by time.

Subclasses

life_event::CWave
life_event::CWave_data

Constructors

Wave ( )

Default constructor.

Member Functions

void
decodeJson ( std::__cxx11::string key,
cJSON * value )

Decode JSON values.

key
value
GLfloat
getAmplitude ( )

Return the maximum amplitude at the current time.

return
GLfloat
getAmplitudeAt ( GLfloat distance )

Get amplitude at a certain point in current time.

distance
return
GLdouble
getAngularMomentum ( )
return
GLfloat
getCenterX ( )
return
GLfloat
getCenterY ( )
return
GLfloat
getDampingConst ( )
return
GLfloat
getFrequency ( )
return
GLfloat
getInitialPhase ( )
return
GLfloat
getTime ( )
return
GLfloat
getTimePeriod ( )
return
GLfloat
getWaveLength ( )
return
GLfloat
getWaveSpeed ( )
return
void
setAmplitude ( GLfloat amplitude )

Set the current maximum amplitude.

amplitude
void
setCenter ( GLfloat x,
GLfloat y )
x
y
void
setCenterX ( GLfloat x )
x
void
setCenterY ( GLfloat y )
y
void
setDampingConst ( GLfloat dampingConst )
dampingConst
void
setFrequency ( GLfloat f )
f
void
setInitialPhase ( GLfloat theta )
theta
void
setTime ( GLfloat time )
time
void
setWaveLength ( GLfloat w )
w