载入中...
搜索中...
未找到
ParticleTrack.cpp
浏览该文件的文档.
19Result<ParticleTrack> ParticleTrack::prepare(float duration, std::vector<ParticleTrajectory> trajectories,
25 return Result<ParticleTrack>::failure(invalidParticle("invalid duration, birth budget or coordinates"));
32 if (t.emitter.isNil() || t.birthSerial == 0 || t.keys.size() < 2 || t.keys.size() > 2000000 - total ||
33 (i && trajectories[i - 1].emitter == t.emitter && trajectories[i - 1].birthSerial == t.birthSerial))
39 if (!std::isfinite(key.seconds) || key.seconds < 0 || key.seconds <= previous || key.seconds > duration ||
41 return Result<ParticleTrack>::failure(invalidParticle("invalid particle event time or presentation"));
48Result<std::size_t> ParticleTrack::sample(float seconds, std::span<BakedParticleSample> output) const {
50 return Result<std::size_t>::failure(invalidParticle("invalid sample time or insufficient output capacity"));
77std::shared_ptr<const BakeRecipe> ParticleTrack::recipe() const noexcept { return data_->recipe; }
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
Bounded provenance builder for explicit-coordinate baked recordings. @ownership Owns names and conten...
Definition BakeRecipe.h:21
Immutable particle trajectories independent of live simulation, ECS and graphics resources....
Definition ParticleTrack.h:42
@ InvalidArgument
Definition Container.h:602
Explicit event/sample time and owning presentation value.
Definition ParticleTrack.h:19