chrono_batch_render/
Coverage:
low: ≥ 0%
medium: ≥ 75.0%
high: ≥ 90.0%
Lines:
4 / 4
100.0%
Branches:
3 / 4
75.0%
Functions:
-
-%

scene/tables/captures.h
Line Branch Exec Source
1 // SPDX-License-Identifier: BSD-3-Clause
2 #pragma once
3
4 #include <cstdint>
5 #include <map>
6 #include <memory>
7 #include <span>
8
9 #include "chrono_batch_render/scene/tables/products.h"
10
11 namespace chrono::batch_render {
12
13
1/1
✓ Branch 1 taken 353 times.
353 struct SimulationClock {
14 double start = 0;
15 double end = 0;
16 double resetTime = 0;
17 uint64_t steps = 0;
18 uint64_t resets = 0;
19 };
20
21
1/2
✓ Branch 1 taken 1 time.
✗ Branch 2 not taken.
1 class CaptureSchedule {
22 public:
23
1/1
✓ Branch 1 taken 150 times.
150 explicit CaptureSchedule(Scene& scene) : m_scene(scene) {}
24
25 void Schedule(std::span<const std::shared_ptr<const ResolvedProduct>> products, double start,
26 double end);
27 void Reset();
28 bool Due(uint32_t prim) const;
29
30 private:
31 157 struct Entry {
32 float frameRate = 0;
33 float startTime = 0;
34 int64_t next = 0;
35 bool due = true;
36 };
37
38 Scene& m_scene;
39 std::map<uint32_t, Entry> m_entries;
40 };
41
42 }
43