MeVisLab Resolution Independence API
Toggle main menu visibility
Loading...
Searching...
No Matches
SoShowFPS.h
Go to the documentation of this file.
1
/*************************************************************************************
2
**
3
** Copyright 2007, MeVis Medical Solutions AG
4
**
5
** The user may use this file in accordance with the license agreement provided with
6
** the Software or, alternatively, in accordance with the terms contained in a
7
** written agreement between the user and MeVis Medical Solutions AG.
8
**
9
** For further information use the contact form at https://www.mevislab.de/contact
10
**
11
**************************************************************************************/
12
13
#ifndef SO_SHOW_FPS_H
14
#define SO_SHOW_FPS_H
15
16
18
19
#include "
SoUtilsSystem.h
"
20
#include "mlTimeCounter.h"
21
#include <Inventor/fields/SoSFInt32.h>
22
#include <Inventor/fields/SoSFBool.h>
23
#include <Inventor/fields/SoSFColor.h>
24
#include <Inventor/fields/SoSFFloat.h>
25
26
//=============================================================
28
//=============================================================
29
class
SOUTILS_EXPORT
SoShowFPS
:
public
SoNode
30
{
31
32
SO_NODE_HEADER(
SoShowFPS
);
33
34
public
:
35
// Constructor
36
SoShowFPS
();
37
39
static
void
initClass
();
40
42
void
GLRender
(SoGLRenderAction* action)
override
;
43
45
bool
affectsState
()
const override
46
{
47
return
false
;
48
}
49
50
51
SoSFInt32
numAverageFrames
;
52
53
SoSFBool
drawRepaintCount
;
54
SoSFBool
drawFPS
;
55
56
SoSFInt32
fontSize
;
57
58
SoSFColor
color
;
59
60
SoSFFloat
alpha
;
61
62
protected
:
63
~SoShowFPS
()
override
;
64
65
private
:
66
ml::TimeCounter _timer;
67
std::vector<float> _recentTimeSpent;
68
69
int
_repaintCount;
70
};
71
72
#endif
SoUtilsSystem.h
SOUTILS_EXPORT
#define SOUTILS_EXPORT
System dependent includes. Disables some compiler/linker warnings.
Definition
SoUtilsSystem.h:30
SoShowFPS::SoShowFPS
SoShowFPS()
SoShowFPS::drawFPS
SoSFBool drawFPS
Definition
SoShowFPS.h:54
SoShowFPS::fontSize
SoSFInt32 fontSize
Definition
SoShowFPS.h:56
SoShowFPS::initClass
static void initClass()
inventor runtime system
SoShowFPS::GLRender
void GLRender(SoGLRenderAction *action) override
derived render method that renders the FPS
SoShowFPS::alpha
SoSFFloat alpha
Definition
SoShowFPS.h:60
SoShowFPS::~SoShowFPS
~SoShowFPS() override
SoShowFPS::drawRepaintCount
SoSFBool drawRepaintCount
Definition
SoShowFPS.h:53
SoShowFPS::numAverageFrames
SoSFInt32 numAverageFrames
Definition
SoShowFPS.h:51
SoShowFPS::color
SoSFColor color
Definition
SoShowFPS.h:58
SoShowFPS::affectsState
bool affectsState() const override
this node does not affect the state, so return false!
Definition
SoShowFPS.h:45
MeVisLab
Standard
Sources
Inventor
SoUtils
SoShowFPS.h
Generated by
1.18.0