-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathSceneSelector.h
45 lines (31 loc) · 961 Bytes
/
SceneSelector.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright 2023-2024 The Khronos Group
// SPDX-License-Identifier: Apache-2.0
#pragma once
// std
#include <functional>
#include <string>
#include <vector>
// anari_test_scenes
#include "anari_test_scenes.h"
// anari_viewer
#include "anari_viewer/windows/Window.h"
namespace anari_viewer::windows {
using SceneSelectionCallback = std::function<void(const char *, const char *)>;
struct SceneSelector : public Window
{
SceneSelector(const char *name = "Scene");
~SceneSelector();
void buildUI() override;
void setCallback(SceneSelectionCallback cb);
void setScene(anari::scenes::SceneHandle scene);
private:
void notify();
std::vector<std::string> m_categories;
std::vector<std::vector<std::string>> m_scenes;
SceneSelectionCallback m_callback;
anari::scenes::SceneHandle m_scene{nullptr};
helium::ParameterInfoList m_parameters;
int m_currentCategory{0};
int m_currentScene{0};
};
} // namespace anari_viewer::windows