RigsofRods
Soft-body Physics Simulation
source
main
gui
panels
GUI_SimActorStats.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
Copyright 2013-2019 Petr Ohlidal
6
7
For more information, see http://www.rigsofrods.org/
8
9
Rigs of Rods is free software: you can redistribute it and/or modify
10
it under the terms of the GNU General Public License version 3, as
11
published by the Free Software Foundation.
12
13
Rigs of Rods is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20
*/
21
25
26
#pragma once
27
28
#include "
ForwardDeclarations.h
"
29
30
namespace
RoR
{
31
namespace
GUI {
32
33
class
SimActorStats
34
{
35
public
:
36
void
SetVisible
(
bool
vis) {
m_is_visible
= vis; }
37
bool
IsVisible
()
const
{
return
m_is_visible
; }
38
39
void
UpdateStats
(
float
dt,
ActorPtr
actor);
40
void
Draw
(
RoR::GfxActor
* actorx);
41
42
private
:
43
bool
m_is_visible
=
false
;
44
float
m_stat_health
= 0.f;
45
int
m_stat_broken_beams
= 0;
46
int
m_stat_deformed_beams
= 0;
47
float
m_stat_beam_stress
= 0.f;
48
float
m_stat_mass_Kg
= 0.f;
49
float
m_stat_avg_deform
= 0.f;
50
float
m_stat_gcur_x
= 0.f;
51
float
m_stat_gcur_y
= 0.f;
52
float
m_stat_gcur_z
= 0.f;
53
float
m_stat_gmax_x
= 0.f;
54
float
m_stat_gmax_y
= 0.f;
55
float
m_stat_gmax_z
= 0.f;
56
};
57
58
}
// namespace GUI
59
}
// namespace RoR
RoR::GUI::SimActorStats
Definition:
GUI_SimActorStats.h:33
ForwardDeclarations.h
Global forward declarations.
RoR::GUI::SimActorStats::UpdateStats
void UpdateStats(float dt, ActorPtr actor)
Caution: touches live data, must be synced with sim. thread.
Definition:
GUI_SimActorStats.cpp:228
RoR::GUI::SimActorStats::m_stat_deformed_beams
int m_stat_deformed_beams
Definition:
GUI_SimActorStats.h:46
RoR::GUI::SimActorStats::m_stat_gmax_x
float m_stat_gmax_x
Definition:
GUI_SimActorStats.h:53
RoR::GUI::SimActorStats::m_stat_mass_Kg
float m_stat_mass_Kg
Definition:
GUI_SimActorStats.h:48
RoR::GUI::SimActorStats::m_stat_gcur_y
float m_stat_gcur_y
Definition:
GUI_SimActorStats.h:51
RoR::GUI::SimActorStats::Draw
void Draw(RoR::GfxActor *actorx)
Definition:
GUI_SimActorStats.cpp:36
RoR::GUI::SimActorStats::m_stat_broken_beams
int m_stat_broken_beams
Definition:
GUI_SimActorStats.h:45
RefCountingObjectPtr< Actor >
RoR::GUI::SimActorStats::m_is_visible
bool m_is_visible
Definition:
GUI_SimActorStats.h:43
RoR::GUI::SimActorStats::m_stat_gmax_z
float m_stat_gmax_z
Definition:
GUI_SimActorStats.h:55
RoR::GUI::SimActorStats::m_stat_gmax_y
float m_stat_gmax_y
Definition:
GUI_SimActorStats.h:54
RoR::GUI::SimActorStats::m_stat_avg_deform
float m_stat_avg_deform
Definition:
GUI_SimActorStats.h:49
RoR::GUI::SimActorStats::m_stat_gcur_z
float m_stat_gcur_z
Definition:
GUI_SimActorStats.h:52
RoR::GUI::SimActorStats::m_stat_health
float m_stat_health
Definition:
GUI_SimActorStats.h:44
RoR::GUI::SimActorStats::m_stat_beam_stress
float m_stat_beam_stress
Definition:
GUI_SimActorStats.h:47
RoR::GfxActor
Definition:
GfxActor.h:52
RoR::GUI::SimActorStats::IsVisible
bool IsVisible() const
Definition:
GUI_SimActorStats.h:37
RoR::GUI::SimActorStats::m_stat_gcur_x
float m_stat_gcur_x
Definition:
GUI_SimActorStats.h:50
RoR::GUI::SimActorStats::SetVisible
void SetVisible(bool vis)
Definition:
GUI_SimActorStats.h:36
RoR
Definition:
AppContext.h:36
Generated by
1.8.17