Oakfield API Documentation 1.0.0
Numerical core APIs
Loading...
Searching...
No Matches
sim_field_topology.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <stdbool.h>
14#include <stddef.h>
15#include <stdint.h>
16
17#include "field.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
32
44
56
67
78
85
94bool sim_field_topology_dimensions(const struct SimField *field, size_t *out_width,
95 size_t *out_height);
96
113bool sim_field_topology_extract(const struct SimField *field, SimFieldTopologyCell *out_cells,
114 size_t cell_capacity, SimFieldTopologySummary *out_summary,
115 const SimFieldTopologyConfig *config, size_t *out_width,
116 size_t *out_height);
117
128void sim_field_topology_cell_pack_rgba8(const SimFieldTopologyCell *cell, uint8_t out_texel[4]);
129
130#ifdef __cplusplus
131}
132#endif
Multidimensional contiguous field abstraction with configurable layout.
bool sim_field_topology_dimensions(const struct SimField *field, size_t *out_width, size_t *out_height)
Resolve the 2D topology dimensions for a field.
SimFieldTopologyCellFlag
Flags describing confidence and validity for a topology cell.
Definition sim_field_topology.h:36
@ SIM_FIELD_TOPOLOGY_CELL_CORE_OFFSET_VALID
Definition sim_field_topology.h:40
@ SIM_FIELD_TOPOLOGY_CELL_NONFINITE
Definition sim_field_topology.h:42
@ SIM_FIELD_TOPOLOGY_CELL_VALID
Definition sim_field_topology.h:37
@ SIM_FIELD_TOPOLOGY_CELL_AMBIGUOUS
Definition sim_field_topology.h:38
SimFieldTopologySeamMask
Bit mask describing which edges of a cell cross a phase seam.
Definition sim_field_topology.h:26
@ SIM_FIELD_TOPOLOGY_SEAM_RIGHT
Definition sim_field_topology.h:28
@ SIM_FIELD_TOPOLOGY_SEAM_BOTTOM
Definition sim_field_topology.h:27
@ SIM_FIELD_TOPOLOGY_SEAM_TOP
Definition sim_field_topology.h:29
@ SIM_FIELD_TOPOLOGY_SEAM_LEFT
Definition sim_field_topology.h:30
void sim_field_topology_cell_pack_rgba8(const SimFieldTopologyCell *cell, uint8_t out_texel[4])
Pack one topology cell into an RGBA8 texel.
void sim_field_topology_config_default(SimFieldTopologyConfig *out_config)
Fill a topology configuration with default thresholds.
bool sim_field_topology_extract(const struct SimField *field, SimFieldTopologyCell *out_cells, size_t cell_capacity, SimFieldTopologySummary *out_summary, const SimFieldTopologyConfig *config, size_t *out_width, size_t *out_height)
Extract phase winding and seam data from a field.
Per-cell phase-topology measurement.
Definition sim_field_topology.h:48
uint8_t flags
Definition sim_field_topology.h:51
float core_offset_y
Definition sim_field_topology.h:53
uint8_t seam_mask
Definition sim_field_topology.h:50
float confidence
Definition sim_field_topology.h:54
int8_t charge
Definition sim_field_topology.h:49
float core_offset_x
Definition sim_field_topology.h:52
Tunable thresholds used by phase-topology extraction.
Definition sim_field_topology.h:71
float seam_phase_threshold
Definition sim_field_topology.h:72
float magnitude_epsilon
Definition sim_field_topology.h:75
bool enable_core_localization
Definition sim_field_topology.h:76
float charge_ambiguity_threshold
Definition sim_field_topology.h:74
float seam_ambiguity_band
Definition sim_field_topology.h:73
Aggregate counts reported by a topology extraction pass.
Definition sim_field_topology.h:60
size_t seam_edge_count
Definition sim_field_topology.h:64
size_t positive_singularities
Definition sim_field_topology.h:62
size_t ambiguous_cell_count
Definition sim_field_topology.h:65
bool valid
Definition sim_field_topology.h:61
size_t negative_singularities
Definition sim_field_topology.h:63
Owning multidimensional field.
Definition field.h:157