|
wavelength 1.0.0
|
A sine wave the connector beam of a player's cursor sways and pulses with. More...
#include <tnlwave.h>
Public Member Functions | |
| TnlWave (const char *pszName) | |
| Construct a wave with only a name. | |
| TnlWave (float flAmplitude, float flFrequency, float flPhase) | |
| Construct an unnamed wave. | |
| ~TnlWave () | |
| Release the name. | |
| void | Sync (float flTime, float flPhase) |
| Choose the phase that gives the wave a phase at a time. | |
| float | Sine (float flTime) const |
| Report the sine of the wave at a time. | |
| float | GetAmplitude () const |
| void | SetAmplitude (float flAmplitude) |
| void | SetFrequency (float flFrequency) |
| void | SetPhase (float flPhase) |
A sine wave the connector beam of a player's cursor sways and pulses with.
The class is not polymorphic, and the name is inferred. The object is 0x20 bytes. The value at a time is the sine of the frequency times 2 pi times the time, plus the phase.
|
explicit |
Construct a wave with only a name.
The amplitude, the frequency, and the phase remain indeterminate.
| pszName | The name, or null. |
| TnlWave::TnlWave | ( | float | flAmplitude, |
| float | flFrequency, | ||
| float | flPhase ) |
Construct an unnamed wave.
| flAmplitude | The amplitude. |
| flFrequency | The frequency, in cycles per tick. |
| flPhase | The phase in radians. |
| TnlWave::~TnlWave | ( | ) |
Release the name.
| void TnlWave::Sync | ( | float | flTime, |
| float | flPhase ) |
Choose the phase that gives the wave a phase at a time.
| flTime | The time. |
| flPhase | The phase at that time. |
| float TnlWave::Sine | ( | float | flTime | ) | const |
Report the sine of the wave at a time.
Every caller expands it.
| flTime | The time. |
|
inline |
|
inline |
| flAmplitude | The amplitude. |
|
inline |
| flFrequency | The frequency, in cycles per tick. |
|
inline |
| flPhase | The phase in radians. |