Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
GUI_FrictionSettings.h
Go to the documentation of this file.
1/*
2 This source file is part of Rigs of Rods
3 Copyright 2005-2012 Pierre-Michel Ricordel
4 Copyright 2007-2012 Thomas Fischer
5
6 For more information, see http://www.rigsofrods.org/
7
8 Rigs of Rods is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License version 3, as
10 published by the Free Software Foundation.
11
12 Rigs of Rods is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
19*/
20
24
25// Remade using DearIMGUI by Petr Ohlidal, 10/2019
26
27#pragma once
28
29#include "Application.h"
30
31#include "SimData.h"
32
33namespace RoR {
34namespace GUI {
35
37{
38public:
39
40 struct Entry
41 {
42 Entry(const ground_model_t* const gm):
43 backup_copy(*gm), working_copy(*gm), live_data(gm)
44 {}
45
49 };
50
51 void SetVisible(bool visible) { m_is_visible = visible; }
52 bool IsVisible() const { return m_is_visible; }
53 bool IsHovered() const { return IsVisible() && m_is_hovered; }
54
55 void AnalyzeTerrain();
56 void setActiveCol(const ground_model_t* gm) { m_nearest_gm = gm; }
57 void Draw();
58
59private:
60 static bool GmComboItemGetter(void* data, int idx, const char** out_text);
61 void DrawTooltip(const char* title, const char* text);
62
63 std::vector<Entry> m_gm_entries;
65 const ground_model_t* m_nearest_gm = nullptr;
66 bool m_is_visible = false;
67 bool m_is_hovered = false;
68};
69
70} // namespace GUI
71} // namespace RoR
Central state/object manager and communications hub.
Core data structures for simulation; Everything affected by by either physics, network or user intera...
const ground_model_t * m_nearest_gm
void DrawTooltip(const char *title, const char *text)
void setActiveCol(const ground_model_t *gm)
static bool GmComboItemGetter(void *data, int idx, const char **out_text)
std::vector< Entry > m_gm_entries
const ground_model_t *const live_data
ground_model_t working_copy
ground_model_t backup_copy
Entry(const ground_model_t *const gm)
Surface friction properties.
Definition SimData.h:704