ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
Util.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 // These are internal helper functions
10 
11 #include <imgui.h>
12 
13 #include <cstdint>
14 #include <string>
15 #include <vector>
16 
17 #include "visualization/gui/Gui.h"
18 
19 namespace cloudViewer {
20 namespace visualization {
21 namespace gui {
22 
23 class Color;
24 
25 // These functions are here, because ImVec4 requires imgui.h, and can't be
26 // forward-declared because we need to know the size, since it is a return
27 // value. Since imgui.h is an implementation detail, we can't put this function
28 // in Color or it would pull in imgui.h pretty much everywhere that gui is used.
29 ImVec4 colorToImgui(const Color& color);
30 uint32_t colorToImguiRGBA(const Color& color);
31 
32 std::string FindFontPath(std::string font, FontStyle style);
33 
34 } // namespace gui
35 } // namespace visualization
36 } // namespace cloudViewer
math::float4 color
uint32_t colorToImguiRGBA(const Color &color)
Definition: Util.cpp:25
std::string FindFontPath(std::string font, FontStyle style)
Definition: Util.cpp:32
ImVec4 colorToImgui(const Color &color)
Definition: Util.cpp:20
Generic file read and write utility for python interface.