wavelength 1.0.0
Loading...
Searching...
No Matches
TnlWave Class Reference

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)

Detailed Description

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.

Constructor & Destructor Documentation

◆ TnlWave() [1/2]

TnlWave::TnlWave ( const char * pszName)
explicit

Construct a wave with only a name.

The amplitude, the frequency, and the phase remain indeterminate.

Parameters
pszNameThe name, or null.
Ghidra address:
NTSC-U/C: 0x001f96f0
Ghidra address:
PAL: 0x00202490

◆ TnlWave() [2/2]

TnlWave::TnlWave ( float flAmplitude,
float flFrequency,
float flPhase )

Construct an unnamed wave.

Parameters
flAmplitudeThe amplitude.
flFrequencyThe frequency, in cycles per tick.
flPhaseThe phase in radians.
Ghidra address:
NTSC-U/C: 0x001f9718
Ghidra address:
PAL: 0x002024b8

◆ ~TnlWave()

TnlWave::~TnlWave ( )

Release the name.

Ghidra address:
NTSC-U/C: 0x001f9778
Ghidra address:
PAL: 0x00202518

Member Function Documentation

◆ Sync()

void TnlWave::Sync ( float flTime,
float flPhase )

Choose the phase that gives the wave a phase at a time.

Parameters
flTimeThe time.
flPhaseThe phase at that time.
Ghidra address:
NTSC-U/C: 0x001f97c0
Ghidra address:
PAL: 0x00202560

◆ Sine()

float TnlWave::Sine ( float flTime) const

Report the sine of the wave at a time.

Every caller expands it.

Parameters
flTimeThe time.
Returns
The sine, from -1 to 1, before the amplitude applies.

◆ GetAmplitude()

float TnlWave::GetAmplitude ( ) const
inline
Returns
The amplitude.

◆ SetAmplitude()

void TnlWave::SetAmplitude ( float flAmplitude)
inline
Parameters
flAmplitudeThe amplitude.

◆ SetFrequency()

void TnlWave::SetFrequency ( float flFrequency)
inline
Parameters
flFrequencyThe frequency, in cycles per tick.

◆ SetPhase()

void TnlWave::SetPhase ( float flPhase)
inline
Parameters
flPhaseThe phase in radians.

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