Line |
Branch |
Exec |
Source |
1 |
|
|
// This file is part of INSTINCT, the INS Toolkit for Integrated |
2 |
|
|
// Navigation Concepts and Training by the Institute of Navigation of |
3 |
|
|
// the University of Stuttgart, Germany. |
4 |
|
|
// |
5 |
|
|
// This Source Code Form is subject to the terms of the Mozilla Public |
6 |
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this |
7 |
|
|
// file, You can obtain one at https://mozilla.org/MPL/2.0/. |
8 |
|
|
|
9 |
|
|
/// @file ImGui.hpp |
10 |
|
|
/// @brief ImGui Helper |
11 |
|
|
/// @author T. Topp (topp@ins.uni-stuttgart.de) |
12 |
|
|
/// @date 2023-09-24 |
13 |
|
|
|
14 |
|
|
#pragma once |
15 |
|
|
|
16 |
|
|
#include <imgui.h> |
17 |
|
|
|
18 |
|
|
/// @brief Scalar multiplication operator |
19 |
|
|
/// @param lhs Left-hand side |
20 |
|
|
/// @param rhs Right-hand side |
21 |
|
|
/// @return Computation result |
22 |
|
✗ |
constexpr ImVec4 operator*(const float& lhs, const ImVec4& rhs) |
23 |
|
|
{ |
24 |
|
✗ |
return { lhs * rhs.x, |
25 |
|
✗ |
lhs * rhs.y, |
26 |
|
✗ |
lhs * rhs.z, |
27 |
|
✗ |
lhs * rhs.w }; |
28 |
|
|
} |
29 |
|
|
|
30 |
|
|
/// @brief Scalar multiplication operator |
31 |
|
|
/// @param lhs Left-hand side |
32 |
|
|
/// @param rhs Right-hand side |
33 |
|
|
/// @return Computation result |
34 |
|
|
constexpr ImVec4 operator*(const ImVec4& lhs, const float& rhs) |
35 |
|
|
{ |
36 |
|
|
return { lhs.x * rhs, |
37 |
|
|
lhs.y * rhs, |
38 |
|
|
lhs.z * rhs, |
39 |
|
|
lhs.w * rhs }; |
40 |
|
|
} |
41 |
|
|
|
42 |
|
|
/// @brief Scalar multiplication operator |
43 |
|
|
/// @param lhs Left-hand side |
44 |
|
|
/// @param rhs Right-hand side |
45 |
|
|
/// @return Computation result |
46 |
|
|
constexpr ImVec4 operator/(const ImVec4& lhs, const float& rhs) |
47 |
|
|
{ |
48 |
|
|
return { lhs.x / rhs, |
49 |
|
|
lhs.y / rhs, |
50 |
|
|
lhs.z / rhs, |
51 |
|
|
lhs.w / rhs }; |
52 |
|
|
} |
53 |
|
|
|