FFT noise module class.
More...
#include <FFT.h>
FFT noise module class.
Definition at line 44 of file FFT.h.
◆ FFT() [1/2]
Hydrax::Noise::FFT::FFT |
( |
| ) |
|
Default constructor.
Definition at line 37 of file FFT.cpp.
◆ FFT() [2/2]
Hydrax::Noise::FFT::FFT |
( |
const Options & |
Options | ) |
|
Constructor.
- Parameters
-
Definition at line 51 of file FFT.cpp.
◆ ~FFT()
Hydrax::Noise::FFT::~FFT |
( |
| ) |
|
Destructor.
Definition at line 66 of file FFT.cpp.
◆ _calculeNoise()
void Hydrax::Noise::FFT::_calculeNoise |
( |
const float & |
delta | ) |
|
|
private |
Calcule noise.
- Parameters
-
delta | Time elapsed since last frame |
Definition at line 469 of file FFT.cpp.
◆ _executeInverseFFT()
void Hydrax::Noise::FFT::_executeInverseFFT |
( |
| ) |
|
|
private |
Execute inverse fast fourier transform.
Definition at line 547 of file FFT.cpp.
◆ _getGaussianRandomFloat()
const float Hydrax::Noise::FFT::_getGaussianRandomFloat |
( |
| ) |
const |
|
private |
Get a Gaussian random number with mean 0 and standard deviation 1, using Box - muller transform.
- Returns
- Gaussian random number with mean 0 and standard deviation 1, using Box - muller transform
Definition at line 506 of file FFT.cpp.
◆ _getPhillipsSpectrum()
const float Hydrax::Noise::FFT::_getPhillipsSpectrum |
( |
const Ogre::Vector2 & |
waveVector, |
|
|
const Ogre::Vector2 & |
wind, |
|
|
const float & |
kwPower_ = 2.0f |
|
) |
| const |
|
private |
Get the Philipps Spectrum, used to create the amplitudes and phases.
- Parameters
-
waveVector | Wave vector |
wind | Wind direction |
kwPower_ | kwPower |
- Returns
- Philipps Spectrum
Definition at line 525 of file FFT.cpp.
◆ _initNoise()
void Hydrax::Noise::FFT::_initNoise |
( |
| ) |
|
|
private |
Initialize noise.
Definition at line 433 of file FFT.cpp.
◆ _normalizeFFTData()
void Hydrax::Noise::FFT::_normalizeFFTData |
( |
const float & |
scale | ) |
|
|
private |
Normalize fft data.
- Parameters
-
Definition at line 714 of file FFT.cpp.
◆ _updateGPUNormalMapResources()
void Hydrax::Noise::FFT::_updateGPUNormalMapResources |
( |
| ) |
|
|
private |
Update gpu normal map resources.
Definition at line 371 of file FFT.cpp.
◆ create()
void Hydrax::Noise::FFT::create |
( |
| ) |
|
|
virtual |
◆ createGPUNormalMapResources()
Create GPUNormalMap resources.
- Parameters
-
- Returns
- true if it needs to be created, false if not
Reimplemented from Hydrax::Noise::Noise.
Definition at line 175 of file FFT.cpp.
◆ getOptions()
const Options& Hydrax::Noise::FFT::getOptions |
( |
| ) |
const |
|
inline |
Get current FFT noise options.
- Returns
- Current fft noise options
Definition at line 213 of file FFT.h.
◆ getValue()
float Hydrax::Noise::FFT::getValue |
( |
const float & |
x, |
|
|
const float & |
y |
|
) |
| |
|
virtual |
◆ loadCfg()
bool Hydrax::Noise::FFT::loadCfg |
( |
Ogre::ConfigFile & |
CfgFile | ) |
|
|
virtual |
◆ remove()
void Hydrax::Noise::FFT::remove |
( |
| ) |
|
|
virtual |
◆ saveCfg()
void Hydrax::Noise::FFT::saveCfg |
( |
Ogre::String & |
Data | ) |
|
|
virtual |
◆ setOptions()
void Hydrax::Noise::FFT::setOptions |
( |
const Options & |
Options | ) |
|
Set/Update fft noise options.
- Parameters
-
Definition at line 125 of file FFT.cpp.
◆ update()
void Hydrax::Noise::FFT::update |
( |
const Ogre::Real & |
timeSinceLastFrame | ) |
|
|
virtual |
Call it each frame.
- Parameters
-
timeSinceLastFrame | Time since last frame(delta) |
Implements Hydrax::Noise::Noise.
Definition at line 423 of file FFT.cpp.
◆ angularFrequencies
float* Hydrax::Noise::FFT::angularFrequencies |
|
private |
the angular frequencies
Definition at line 266 of file FFT.h.
◆ currentWaves
std::complex<float>* Hydrax::Noise::FFT::currentWaves |
|
private |
the data of the simulation at time t, which is formed using the data at time 0 and the angular frequencies at time t
Definition at line 264 of file FFT.h.
◆ img
float * Hydrax::Noise::FFT::img |
|
private |
◆ initialWaves
std::complex<float>* Hydrax::Noise::FFT::initialWaves |
|
private |
the data which is referred as h0{x,t), that is, the data of the simulation at the time 0.
Definition at line 262 of file FFT.h.
◆ maximalValue
float Hydrax::Noise::FFT::maximalValue |
|
private |
The minimal value of the result data of the fft transformation.
Definition at line 259 of file FFT.h.
◆ mGPUNormalMapManager
◆ mOptions
Options Hydrax::Noise::FFT::mOptions |
|
private |
◆ re
float* Hydrax::Noise::FFT::re |
|
private |
Pointers to resolution*resolution float size arrays.
Definition at line 257 of file FFT.h.
◆ resolution
int Hydrax::Noise::FFT::resolution |
|
private |
◆ time
float Hydrax::Noise::FFT::time |
|
private |
Current time.
Definition at line 268 of file FFT.h.
The documentation for this class was generated from the following files: