MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ write_snapshot()

bool MayaFlux::IO::RelaxationGridCapture::write_snapshot ( std::span< const uint8_t > bytes)

Write one snapshot as a sample, if currently capturing.

Parameters
bytesOne generation's raw cell state, exactly what the caller's own snapshot_source() listener received.
Returns
True if not currently capturing (a no-op still succeeds) or the sample was written; false if to_attributes() or SpatialCache::write() fails.

Definition at line 205 of file SpatialTransfer.cpp.

206{
207 if (!m_cache) {
208 return true;
209 }
210
211 return m_cache->write(m_stream_name,
212 SpatialSample {
214 .positions = m_positions,
215 .ids = m_ids,
216 .attributes = m_to_attributes(bytes) });
217}
std::shared_ptr< SpatialCache > m_cache

References m_cache, m_ids, m_positions, m_stream_name, m_to_attributes, and MayaFlux::Portal::Graphics::POINT_LIST.