chrono_batch_render/
Coverage:
low: ≥ 0%
medium: ≥ 75.0%
high: ≥ 90.0%
Lines:
6 / 6
100.0%
Branches:
5 / 9
55.6%
Functions:
2 / 2, 1 excl
100.0%

scene/tables/spectra.h
Line Branch Exec Source
1 // SPDX-License-Identifier: BSD-3-Clause
2 #pragma once
3
4 #include <span>
5 #include <string_view>
6 #include <vector>
7
8 #include "chrono_batch_render/device/buffer.h"
9 #include "chrono_batch_render/device/ref.h"
10 #include "chrono_batch_render/scene/records/spectra.h"
11 #include "chrono_batch_render/scene/tables/table.h"
12 #include "chrono_batch_render/stage/structure/structure.h"
13
14 namespace chrono::batch_render {
15
16 class SpectralTable : public RenderTable {
17 public:
18
1/1
✓ Branch 1 taken 353 times.
353 explicit SpectralTable(Structure& structure) : m_structure(structure) {}
19
20 928 std::string_view Name() const override {
21 928 return "spectra";
22 }
23
24 std::span<const ColumnRef> Inputs() const override;
25 void Run(const ChangeSet& changes, TableVersions& versions) override;
26 void Describe(RenderTables& tables) const override;
27
28 928 void Hold(std::vector<Ref<const RefCounted>>& held) const override {
29
4/8
✓ Branch 1 taken 5568 times.
✓ Branch 2 taken 928 times.
✓ Branch 3 taken 5562 times.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
✗ Branch 7 not taken.
✗ Branch 8 not taken.
7424 HoldBuffers(held, {m_rgb, m_bands, m_ranges, m_samples, m_sigmoids, m_sigmoidScales});
30 1856 }
31
32 private:
33 Structure& m_structure;
34 Ref<device::Buffer> m_rgb;
35 Ref<device::Buffer> m_bands;
36 Ref<device::Buffer> m_ranges;
37 Ref<device::Buffer> m_samples;
38 Ref<device::Buffer> m_sigmoids;
39 Ref<device::Buffer> m_sigmoidScales;
40 uint32_t m_count = 0;
41 uint32_t m_detectors = 0;
42 };
43
44 }
45