载入中...
搜索中...
未找到
ParticleEventJournal.h
浏览该文件的文档.
1#pragma once
2#include <cstdint>
3#include <span>
4#include <vector>
5#include "common/Export.h"
6#include "common/Result.h"
8namespace eve::particles {
25public:
30 [[nodiscard]] Result<void> prepare(std::size_t maximumEvents);
34 [[nodiscard]] Result<void> append(ParticleRecordEvent event);
40 [[nodiscard]] Result<std::vector<ParticleRecordEvent>> finish();
42 void invalidate() noexcept;
44 void disable() noexcept;
46 [[nodiscard]] ParticleRecordState state() const noexcept;
50 [[nodiscard]] std::span<const ParticleRecordEvent> events() const noexcept;
51
52private:
53 std::vector<ParticleRecordEvent> events_;
54 std::size_t limit_ = 0;
55 ParticleRecordState state_ = ParticleRecordState::Disabled;
56};
57} // namespace eve::particles
#define EVENGINE_API_DOMAINS
Definition Export.h:110
std::vector< particles::ParticleRecordEvent > events
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Bounded owner-thread particle recording buffer with explicit time and sticky errors....
ParticleRecordState
Journal lifecycle; failures are sticky until an explicit new recording is prepared.
ParticleRecordEventKind
Snapshot creates or updates a birth; death closes it at the exact simulation boundary.
Owning CPU sprite appearance, with pixel rectangle, degree rotation, color and normalized atlas UV.
Owning presentation event without simulation or resource references.