|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Turbulence stimulus built from a centered absolute-value fractal basis. More...
#include "coords.h"#include "oakfield/operator_split.h"#include <stdbool.h>#include <stddef.h>#include <stdint.h>

Go to the source code of this file.
Classes | |
| struct | SimStimulusTurbulenceConfig |
| Configuration for seeded billowy turbulence stimulus noise. More... | |
Typedefs | |
| typedef struct SimStimulusTurbulenceConfig | SimStimulusTurbulenceConfig |
| Configuration for seeded billowy turbulence stimulus noise. | |
Functions | |
| SimResult | sim_add_stimulus_turbulence_operator (struct SimContext *context, const SimStimulusTurbulenceConfig *config, size_t *out_index) |
| Register a billowy turbulence stimulus operator. | |
| SimResult | sim_stimulus_turbulence_config (struct SimContext *context, size_t operator_index, SimStimulusTurbulenceConfig *out_config) |
| Copy the current turbulence configuration from a registered operator. | |
| SimResult | sim_stimulus_turbulence_update (struct SimContext *context, size_t operator_index, const SimStimulusTurbulenceConfig *config) |
| Replace or renormalize a registered turbulence stimulus configuration. | |
Turbulence stimulus built from a centered absolute-value fractal basis.
Synthesizes billowy multi-octave turbulence using T(x) = sum_o A 2^{-H o} (|cos(2π λ^o x + φ_o)| - 2/π).
For complex fields, the imaginary channel uses the corresponding centered absolute sine basis.
| SimResult sim_add_stimulus_turbulence_operator | ( | struct SimContext * | context, |
| const SimStimulusTurbulenceConfig * | config, | ||
| size_t * | out_index | ||
| ) |
Register a billowy turbulence stimulus operator.
The implementation copies and normalizes config, initializes octave phases from the configured seed, and registers the turbulence operator.
| context | Simulation context that will own the operator. | |
| config | Optional turbulence configuration; NULL selects normalized defaults. | |
| [out] | out_index | Optional destination for the registered operator index. |
| SimResult sim_stimulus_turbulence_config | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| SimStimulusTurbulenceConfig * | out_config | ||
| ) |
Copy the current turbulence configuration from a registered operator.
| context | Simulation context containing the operator. | |
| operator_index | Index returned by sim_add_stimulus_turbulence_operator(). | |
| [out] | out_config | Receives the operator's normalized configuration. |
| SimResult sim_stimulus_turbulence_update | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| const SimStimulusTurbulenceConfig * | config | ||
| ) |
Replace or renormalize a registered turbulence stimulus configuration.
Passing NULL for config keeps the existing configuration and reapplies normalization. A successful update refreshes octave data and invalidates the scheduler plan.
| context | Simulation context containing the operator. |
| operator_index | Index of the turbulence operator to update. |
| config | Optional replacement configuration. |