45 std::string stream_name,
46 std::shared_ptr<Buffers::NetworkGeometryBuffer> buffer);
76 std::shared_ptr<SpatialCache> cache,
77 std::vector<SpatialCaptureSource> sources);
90 void start(uint32_t max_frames = 0, uint64_t frame_interval = 1);
164 using ToAttributes = std::function<std::vector<SpatialAttribute>(std::span<const uint8_t>)>;
175 std::shared_ptr<Buffers::RelaxationGridBuffer> grid,
176 std::string stream_name,
191 bool start(
const std::string& filepath);
208 bool write_snapshot(std::span<const uint8_t> bytes);
211 std::shared_ptr<Buffers::RelaxationGridBuffer>
m_grid;
233 const std::string& path_pattern,
234 const std::vector<SpatialCaptureSource>& sources);
Specialized buffer for geometry from NodeNetwork instances.
GPU-resident, double-buffered SSBO state for synchronous local-rule systems evaluated over a fixed 2D...
std::function< std::vector< SpatialAttribute >(std::span< const uint8_t >)> ToAttributes
std::shared_ptr< SpatialCache > m_cache
RelaxationGridCapture(const RelaxationGridCapture &)=delete
bool is_capturing() const
bool start(const std::string &filepath)
Open the archive.
RelaxationGridCapture & operator=(const RelaxationGridCapture &)=delete
void stop()
Close the archive.
std::vector< uint64_t > m_ids
std::vector< glm::vec3 > m_positions
ToAttributes m_to_attributes
RelaxationGridCapture(std::shared_ptr< Buffers::RelaxationGridBuffer > grid, std::string stream_name, float extent, ToAttributes to_attributes)
RelaxationGridCapture(RelaxationGridCapture &&)=delete
std::string m_stream_name
RelaxationGridCapture & operator=(RelaxationGridCapture &&)=delete
std::shared_ptr< Buffers::RelaxationGridBuffer > m_grid
Alembic-backed writer for time-sampled spatial entity state: particle systems, point clouds,...
std::shared_ptr< SpatialCache > m_cache
std::vector< SpatialCaptureSource > m_sources
static bool run_one_frame(CaptureState &state)
One tick: write every source's stream.
void start(uint32_t max_frames=0, uint64_t frame_interval=1)
Spawn the capture routine, resetting the frame counter.
std::shared_ptr< CaptureState > m_state
uint32_t frames_written() const
SpatialCapture(const SpatialCapture &)=delete
Vruta::TaskScheduler & m_scheduler
void stop()
Request the capture routine stop.
SpatialCapture(Vruta::TaskScheduler &scheduler, std::shared_ptr< SpatialCache > cache, std::vector< SpatialCaptureSource > sources)
SpatialCapture & operator=(const SpatialCapture &)=delete
bool is_recording() const
Token-based multimodal task scheduling system for unified coroutine processing.
bool save_spatial_snapshot(const std::string &path_pattern, const std::vector< SpatialCaptureSource > &sources)
Open a fresh SpatialCache, write every source once, then close it.
SpatialCaptureSource make_network_geometry_source(std::string stream_name, std::shared_ptr< Buffers::NetworkGeometryBuffer > buffer)
Build a SpatialCaptureSource that packs a NetworkGeometryBuffer's driving network through write_netwo...
std::function< bool(SpatialCache &, const std::string &)> capture_frame
One named stream a SpatialCapture (or save_spatial_snapshot) writes into a SpatialCache each tick.