|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Worley / cellular noise stimulus with selectable distance metrics. 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 | SimStimulusWorleyNoiseConfig |
| Configuration for seeded Worley cellular-noise stimulus fields. More... | |
Typedefs | |
| typedef enum SimStimulusWorleyDistanceMetric | SimStimulusWorleyDistanceMetric |
| Distance metric used when evaluating Worley feature points. | |
| typedef enum SimStimulusWorleyOutputMode | SimStimulusWorleyOutputMode |
| Feature-distance output selected by Worley noise. | |
| typedef struct SimStimulusWorleyNoiseConfig | SimStimulusWorleyNoiseConfig |
| Configuration for seeded Worley cellular-noise stimulus fields. | |
Enumerations | |
| enum | SimStimulusWorleyDistanceMetric { SIM_STIMULUS_WORLEY_EUCLIDEAN = 0 , SIM_STIMULUS_WORLEY_MANHATTAN = 1 , SIM_STIMULUS_WORLEY_CHEBYSHEV = 2 , SIM_STIMULUS_WORLEY_MINKOWSKI = 3 } |
| Distance metric used when evaluating Worley feature points. More... | |
| enum | SimStimulusWorleyOutputMode { SIM_STIMULUS_WORLEY_F1 = 0 , SIM_STIMULUS_WORLEY_F2 = 1 , SIM_STIMULUS_WORLEY_F2_MINUS_F1 = 2 } |
| Feature-distance output selected by Worley noise. More... | |
Functions | |
| SimResult | sim_add_stimulus_worley_noise_operator (struct SimContext *context, const SimStimulusWorleyNoiseConfig *config, size_t *out_index) |
| Register a Worley cellular-noise stimulus operator. | |
| SimResult | sim_stimulus_worley_noise_config (struct SimContext *context, size_t operator_index, SimStimulusWorleyNoiseConfig *out_config) |
| Copy the current Worley-noise configuration from a registered operator. | |
| SimResult | sim_stimulus_worley_noise_update (struct SimContext *context, size_t operator_index, const SimStimulusWorleyNoiseConfig *config) |
| Replace or renormalize a registered Worley-noise stimulus configuration. | |
Worley / cellular noise stimulus with selectable distance metrics.
Synthesizes one deterministic feature point per lattice cell and evaluates the distance to the nearest or second-nearest feature. The lattice is sampled in a local coordinate frame controlled by coord, then scaled by feature_frequency.
For complex fields, the imaginary component is generated from an independent deterministic feature lattice derived from the same seed.
| SimResult sim_add_stimulus_worley_noise_operator | ( | struct SimContext * | context, |
| const SimStimulusWorleyNoiseConfig * | config, | ||
| size_t * | out_index | ||
| ) |
Register a Worley cellular-noise stimulus operator.
The implementation copies and normalizes config, derives deterministic hash bases from the seed, and registers the noise operator on the target field.
| context | Simulation context that will own the operator. | |
| config | Optional Worley-noise configuration; NULL selects normalized defaults. | |
| [out] | out_index | Optional destination for the registered operator index. |
| SimResult sim_stimulus_worley_noise_config | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| SimStimulusWorleyNoiseConfig * | out_config | ||
| ) |
Copy the current Worley-noise configuration from a registered operator.
| context | Simulation context containing the operator. | |
| operator_index | Index returned by sim_add_stimulus_worley_noise_operator(). | |
| [out] | out_config | Receives the operator's normalized configuration. |
| SimResult sim_stimulus_worley_noise_update | ( | struct SimContext * | context, |
| size_t | operator_index, | ||
| const SimStimulusWorleyNoiseConfig * | config | ||
| ) |
Replace or renormalize a registered Worley-noise stimulus configuration.
Passing NULL for config keeps the existing configuration and reapplies normalization. A successful update refreshes hash bases/caches as needed and invalidates the scheduler plan.
| context | Simulation context containing the operator. |
| operator_index | Index of the Worley-noise operator to update. |
| config | Optional replacement configuration. |