Acquire data from all bound sources and write into the container.
For each bound series: acquires from source, writes into container m_data, then copies m_data into processed_data. Unbound series are left unchanged. Called from the graphics thread by Forma before the geometry function runs.
Implements MayaFlux::Kakshya::DataProcessor.
Definition at line 156 of file PlotProcessor.cpp.
157{
158 auto plot = std::dynamic_pointer_cast<PlotContainer>(container);
159 if (!plot) {
160 MF_ERROR(C, X,
"PlotProcessor::process: container is not a PlotContainer");
161 return;
162 }
163
165
167 if (idx >=
plot->series_count())
168 continue;
169
170 thread_local std::vector<double> staging;
171 staging.resize(
plot->series_size(idx));
172
173 {
174 auto frame =
plot->get_frame(idx).as<
double>();
175 if (frame.size() == staging.size()) {
176 std::ranges::copy(frame, staging.begin());
177 } else {
178 std::ranges::fill(staging, 0.0);
179 }
180 }
181
182 switch (
b.source_type) {
185 break;
188 break;
191 break;
194 break;
197 break;
198 }
199
200 plot->write_series(idx, staging);
201 }
202
204 auto&
dst =
plot->get_processed_data();
206 for (
size_t i = 0; i <
src.size(); ++i)
208
210}
#define MF_ERROR(comp, ctx,...)
void acquire_from_raw(SeriesBinding &b, std::vector< double > &series)
std::atomic< bool > m_processing
std::unordered_map< uint32_t, SeriesBinding > m_bindings
void acquire_from_audio_buffer(SeriesBinding &b, std::vector< double > &series)
void acquire_from_callable(SeriesBinding &b, std::vector< double > &series)
void acquire_from_node(SeriesBinding &b, std::vector< double > &series)
void acquire_from_network(SeriesBinding &b, std::vector< double > &series)
References acquire_from_audio_buffer(), acquire_from_callable(), acquire_from_network(), acquire_from_node(), acquire_from_raw(), AUDIO_BUFFER, b, CALLABLE, dst, m_bindings, m_processing, MF_ERROR, NETWORK, NODE, RAW, and src.