![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
A templated class for performing Fast Fourier Transform (FFT) operations. More...
#include <FFT.h>
Static Public Member Functions | |
| static void | Radix2FFT (float *data) |
| Performs a Radix-2 FFT on the provided data. | |
| static void | ComplexMagnitude (float *complexData, float *magnitude) |
| Computes the magnitude of complex numbers from interleaved real and imaginary components. | |
Static Private Member Functions | |
| static constexpr int | CalculateBits (int size, int count=0) |
| Calculates the number of bits required for bit reversal based on FFT size. | |
| static void | BitReverseOrder (float *data) |
| Reorders the data array in bit-reversed order. | |
| static int | ReverseBits (int num) |
| Reverses the bits of an integer. | |
| static void | Swap (float *a, float *b) |
| Swaps two floating-point values. | |
Static Private Attributes | |
| static const constexpr float | twiddleCoefficients [fftSize *2] |
| Precomputed twiddle coefficients for the FFT. | |
| static const constexpr int | bitCount = CalculateBits(fftSize) |
| The number of bits needed for bit reversal for this FFT size. | |
A templated class for performing Fast Fourier Transform (FFT) operations.
| fftSize | The size of the FFT, must be a power of 2. |
Reorders the data array in bit-reversed order.
| data | The data array to reorder. |
|
static |
Computes the magnitude of complex numbers from interleaved real and imaginary components.
| complexData | The input array containing interleaved real and imaginary components. |
| magnitude | The output array for storing computed magnitudes. |
Referenced by MicrophoneFourier::Update(), and MicrophoneFourier::UpdateDMA().
Performs a Radix-2 FFT on the provided data.
| data | The input array containing interleaved real and imaginary components. |
Referenced by MicrophoneFourier::Update(), and MicrophoneFourier::UpdateDMA().
Reverses the bits of an integer.
| num | The number whose bits are to be reversed. |
Swaps two floating-point values.
| a | Pointer to the first value. |
| b | Pointer to the second value. |