Kinetic Visualization (Visualisierung 2 - S2012)
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
src
vis2
vis2
AppletParticleKinematic.h
Go to the documentation of this file.
1
#ifndef _APPLET_PARTICLE_KINEMATIC
2
#define _APPLET_PARTICLE_KINEMATIC
3
4
#include <vlGraphics/Framebuffer.hpp>
5
#include <vlGraphics/GeometryPrimitives.hpp>
6
#include <vlGraphics/Applet.hpp>
7
#include <vlGraphics/Rendering.hpp>
8
#include <vlCore/VisualizationLibrary.hpp>
9
#include <vlCore/ResourceDatabase.hpp>
10
#include <vlCore/Time.hpp>
11
13
class
AppletParticleKinematicListener
14
{
15
public
:
16
virtual
void
volumeImageChanged
(vl::Image *img) = 0;
17
};
18
20
class
AppletParticleKinematic
:
public
vl::Applet
21
{
22
public
:
23
AppletParticleKinematic
()
24
{
25
_mFPSTimer
.start();
26
}
27
28
void
updateEvent
()
29
{
30
vl::Applet::updateEvent
();
31
32
if
(
_mFPSTimer
.elapsed() > 2)
33
{
34
_mFPSTimer
.start();
35
36
openglContext()->setWindowTitle( vl::Say(
"[%.1n] %s"
) << fps() << appletName() +
" - "
+ vl::String(
"VL "
) + vl::VisualizationLibrary::versionString());
37
38
vl::Log::print(vl::Say(
"FPS=%.1n\n"
) << fps());
39
}
40
}
41
42
virtual
vl::String
appletInfo
()
43
{
44
return
"Applet info: "
+ appletName() +
"\n"
+
45
"Keys:\n"
+
46
"- Escape: quits the application.\n"
+
47
//"- T: enables the TrackballManipulator.\n" +
48
//"- F: enables the GhostCameraManipulator (use A/D S/W keys).\n" +
49
//"- F1: toggles fullscreen mode if supported.\n" +
50
//"- F5: saves a screenshot of the current OpenGL window.\n" +
51
//"- C: toggles the continuous update of the OpenGL window.\n" +
52
//"- U: force update of the OpenGL window.\n" +
53
"\n"
;
54
}
55
56
virtual
~AppletParticleKinematic
() {}
57
58
virtual
void
fileDroppedEvent
(
const
std::vector<vl::String>&) = 0;
59
60
virtual
void
setStickParticleToDensityLevel
(
bool
) = 0;
61
virtual
void
setParticleCurvatureK
(
float
) = 0;
62
virtual
void
setParticleFlockingK
(
float
) = 0;
63
virtual
void
setParticleFlockingSigma
(
float
) = 0;
64
virtual
void
setUserPreferredDirectionK
(
float
) = 0;
65
virtual
void
setUserPreferredDirection
(
const
vl::vec3&) = 0;
66
virtual
void
setParticleRepulsionK
(
float
) = 0;
67
virtual
void
setParticleRepulsionSigma
(
float
) = 0;
68
virtual
void
enableDying
(
bool
) = 0;
69
virtual
void
setCrowdedThreshold
(
float
) = 0;
70
virtual
void
setCrowdedSigma
(
float
) = 0;
71
72
virtual
void
setPreprocessingSigma
(
float
) = 0;
73
virtual
void
setDensityLevel
(
float
) = 0;
74
virtual
void
enableGaussianPreprocessing
(
bool
) = 0;
75
virtual
void
setGradientMagnitudeThreshold
(
float
) = 0;
76
virtual
void
setMaxNumParticles
(
int
) = 0;
77
virtual
void
setNeighbourRadius
(
int
) = 0;
78
79
virtual
void
setSampleStep
(
float
) = 0;
80
virtual
void
setShadingIntensity
(
float
) = 0;
81
virtual
void
setGradientIntensity
(
float
) = 0;
82
virtual
void
setOpacityIntensity
(
float
) = 0;
83
virtual
void
setParticleSize
(
float
) = 0;
84
virtual
void
setRenderSmoothedImage
(
bool
) = 0;
85
virtual
void
setParticlesEnabled
(
bool
) = 0;
86
virtual
void
setParticleShadingEnabled
(
bool
) = 0;
87
virtual
void
setRenderModeByIndex
(
int
) = 0;
88
virtual
void
setTransferFunction
(vl::ref<vl::Image> img) = 0;
89
virtual
vl::Image*
getImage
() = 0;
90
virtual
void
addAppletParticleKinematicListener
(
AppletParticleKinematicListener
*l) = 0;
91
virtual
void
removeAppletParticleKinematicListener
(
AppletParticleKinematicListener
*l) = 0;
92
virtual
vl::String
getVolumeFilename
() = 0;
93
94
private
:
95
vl::Time
_mFPSTimer
;
//Framerate calculation
96
};
97
98
#endif // _APPLET_PARTICLE_KINEMATIC
Generated on Tue Jun 12 2012 15:05:37 for Kinetic Visualization (Visualisierung 2 - S2012) by
1.8.1