6class NetworkGeometryBuffer;
7class RelaxationGridBuffer;
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);
108 [[nodiscard]]
bool is_recording()
const;
109 [[nodiscard]] uint32_t frames_written()
const;
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);
std::shared_ptr< NetworkGeometryBuffer > buffer
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
RelaxationGridCapture & operator=(const RelaxationGridCapture &)=delete
std::vector< uint64_t > m_ids
std::vector< glm::vec3 > m_positions
ToAttributes m_to_attributes
RelaxationGridCapture(RelaxationGridCapture &&)=delete
std::string m_stream_name
RelaxationGridCapture & operator=(RelaxationGridCapture &&)=delete
std::shared_ptr< Buffers::RelaxationGridBuffer > m_grid
Records time-sampled cell state from a RelaxationGridBuffer into an Alembic archive.
Alembic-backed writer for time-sampled spatial entity state: particle systems, point clouds,...
std::shared_ptr< SpatialCache > m_cache
std::vector< SpatialCaptureSource > m_sources
std::shared_ptr< CaptureState > m_state
SpatialCapture(const SpatialCapture &)=delete
Vruta::TaskScheduler & m_scheduler
SpatialCapture & operator=(const SpatialCapture &)=delete
Records time-sampled spatial data from one or more sources into a single Alembic archive.
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.