SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLEnums.h
Go to the documentation of this file.
1 /**
2  * \file sl/SLEnums.h
3  * \date July 2014
4  * \authors Marcus Hudritsch
5  * \copyright http://opensource.org/licenses/GPL-3.0
6  * \remarks Please use clangformat to format the code. See more code style on
7  * https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style
8  */
9 
10 #ifndef SLENUMSID_H
11 #define SLENUMSID_H
12 
13 //-----------------------------------------------------------------------------
14 //! Keyboard key codes enumeration
15 enum SLKey
16 {
17  K_none = 0,
18  K_space = 32,
19  K_tab = 256,
61  K_super = 0x00100000,
62  K_shift = 0x00200000,
63  K_ctrl = 0x00400000,
64  K_alt = 0x00800000
65 };
66 //-----------------------------------------------------------------------------
67 //! Rendering type enumeration
69 {
70  RT_gl = 0, //!< OpenGL
71  RT_rt = 1, //!< Ray Tracing
72  RT_pt = 2, //!< Path Tracing
73  RT_optix_rt = 3, //!< Ray Tracing with OptiX
74  RT_optix_pt = 4 //!< Path Tracing with OptiX
75 };
76 //-----------------------------------------------------------------------------
77 //! Coordinate axis enumeration
78 enum SLAxis
79 {
80  A_x = 0,
81  A_y = 1,
82  A_z = 2
83 };
84 //-----------------------------------------------------------------------------
85 //! Scene identifier
86 /*
87 Apps define a custom enum for identifiying their scenes, SLSceneID simply aliases
88 to an int. This app-specific enum has to be based on SLSceneID and has to include
89 SL_EMPTY_SCENE_ID because the SL library requires an empty scene to be available.
90 */
91 typedef int SLSceneID;
92 //-----------------------------------------------------------------------------
93 //! SLSceneID for an empty scene
95 //-----------------------------------------------------------------------------
96 //! Mouse button codes
98 {
102  MB_right
103 };
104 //-----------------------------------------------------------------------------
105 //! Enumeration for text alignment in a box
107 {
117 };
118 //-----------------------------------------------------------------------------
119 //! Enumeration for available camera animation types
121 {
122  CA_turntableYUp, //!< Orbiting around central object w. turntable rotation around y & right axis.
123  CA_turntableZUp, //!< Orbiting around central object w. turntable rotation around z & right axis.
124  CA_trackball, //!< Orbiting around central object w. one rotation around one axis
125  CA_walkingYUp, //!< Walk translation with AWSD and look around rotation around y & right axis.
126  CA_walkingZUp, //!< Walk translation with AWSD and look around rotation around z & right axis.
127  CA_deviceRotYUp, //!< The device rotation controls the camera rotation.
128  CA_deviceRotLocYUp, //!< The device rotation controls the camera rotation and the GPS controls the Camera Translation
129  CA_off //!< No camera animation
130 };
131 //-----------------------------------------------------------------------------
132 //! Enumeration for different camera projections
134 {
135  P_monoPerspective = 0, //!< standard mono pinhole perspective projection
136  P_monoIntrinsic, //!< standard mono pinhole perspective projection from intrinsic calibration
137  P_monoOrthographic, //!< standard mono orthographic projection
138  P_stereoSideBySide, //!< side-by-side
139  P_stereoSideBySideP, //!< side-by-side proportional for mirror stereoscopes
140  P_stereoSideBySideD, //!< side-by-side distorted for Oculus Rift like glasses
141  P_stereoLineByLine, //!< line-by-line
142  P_stereoColumnByColumn, //!< column-by-column
143  P_stereoPixelByPixel, //!< checkerboard pattern (DLP3D)
144  P_stereoColorRC, //!< color masking for red-cyan anaglyphs
145  P_stereoColorRG, //!< color masking for red-green anaglyphs
146  P_stereoColorRB, //!< color masking for red-blue anaglyphs
147  P_stereoColorYB //!< color masking for yellow-blue anaglyphs (ColorCode 3D)
148 };
149 //-----------------------------------------------------------------------------
150 //! Enumeration for stereo eye type used for camera projection
152 {
153  ET_left = -1,
155  ET_right = 1
156 };
157 //-----------------------------------------------------------------------------
158 //! Enumeration for animation modes
160 {
162  AI_bezier
163 };
164 //-----------------------------------------------------------------------------
165 //! Enumeration for animation modes
167 {
168  AL_once = 0, //!< play once
169  AL_loop = 1, //!< loop
170  AL_pingPong = 2, //!< play once in two directions
171  AL_pingPongLoop = 3 //!< loop forward and backwards
172 };
173 //-----------------------------------------------------------------------------
174 //! Enumeration for animation easing curves
175 /*!
176 Enumerations copied from Qt class QEasingCurve.
177 See http://qt-project.org/doc/qt-4.8/qeasingcurve.html#Type-enum
178 */
180 {
181  EC_linear = 0, //!< linear easing with constant velocity
182  EC_inQuad = 1, //!< quadratic easing in, acceleration from zero velocity
183  EC_outQuad = 2, //!< quadratic easing out, decelerating to zero velocity
184  EC_inOutQuad = 3, //!< quadratic easing in and then out
185  EC_outInQuad = 4, //!< quadratic easing out and then in
186  EC_inCubic = 5, //!< cubic in easing in, acceleration from zero velocity
187  EC_outCubic = 6, //!< cubic easing out, decelerating to zero velocity
188  EC_inOutCubic = 7, //!< cubic easing in and then out
189  EC_outInCubic = 8, //!< cubic easing out and then in
190  EC_inQuart = 9, //!< quartic easing in, acceleration from zero velocity
191  EC_outQuart = 10, //!< quartic easing out, decelerating to zero velocity
192  EC_inOutQuart = 11, //!< quartic easing in and then out
193  EC_outInQuart = 12, //!< quartic easing out and then in
194  EC_inQuint = 13, //!< quintic easing in, acceleration from zero velocity
195  EC_outQuint = 14, //!< quintic easing out, decelerating to zero velocity
196  EC_inOutQuint = 15, //!< quintic easing in and then out
197  EC_outInQuint = 16, //!< quintic easing out and then in
198  EC_inSine = 17, //!< sine easing in, acceleration from zero velocity
199  EC_outSine = 18, //!< sine easing out, decelerating to zero velocity
200  EC_inOutSine = 19, //!< sine easing in and then out
201  EC_outInSine = 20, //!< sine easing out and then in
202 };
203 //-----------------------------------------------------------------------------
204 //! Describes the relative space a transformation is applied in.
206 {
207  // Do not change order!
208  TS_world = 0,
210  TS_object
211 };
212 //-----------------------------------------------------------------------------
213 //! Skinning methods
215 {
216  SM_hardware, //!< Do vertex skinning on the GPU
217  SM_software //!< Do vertex skinning on the CPU
218 };
219 //-----------------------------------------------------------------------------
220 //! Shader type enumeration for vertex or fragment (pixel) shader
222 {
228 };
229 //-----------------------------------------------------------------------------
230 //! Type definition for GLSL uniform1f variables that change per frame.
232 {
233  UT_const, //!< constant value
234  UT_incDec, //!< never ending loop from min to max and max to min
235  UT_incInc, //!< never ending loop from min to max
236  UT_inc, //!< never ending increment
237  UT_random, //!< random values between min and max
238  UT_seconds, //!< seconds since the process has started
239  UT_lambda //!< lambda getter function
240 };
241 //-----------------------------------------------------------------------------
242 // @todo build a dedicated log class that defines this verbosity levels
244 {
245  LV_quiet = 0,
249  LV_diagnostic = 4
250 };
251 //-----------------------------------------------------------------------------
252 //! Mouse button codes
254 {
257 };
258 //-----------------------------------------------------------------------------
259 //! Corresponds to the old fog modes in OpenGL 2.1
260 /*! See also: https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glFog.xml
261  */
263 {
266  FM_exp2
267 };
268 //-----------------------------------------------------------------------------
269 //! Billboard type for its orientation used in SLParticleSystem
271 {
275 };
276 //-----------------------------------------------------------------------------
277 //! Particle system shape type
279 {
283  ST_Pyramid
284 };
285 //-----------------------------------------------------------------------------
286 //! Light Reflection Models for shader generation usd in SLMaterial
288 {
292  RM_Custom
293 };
294 //-----------------------------------------------------------------------------
295 #endif
SLCamAnim
Enumeration for available camera animation types.
Definition: SLEnums.h:121
@ CA_turntableYUp
Orbiting around central object w. turntable rotation around y & right axis.
Definition: SLEnums.h:122
@ CA_walkingYUp
Walk translation with AWSD and look around rotation around y & right axis.
Definition: SLEnums.h:125
@ CA_off
No camera animation.
Definition: SLEnums.h:129
@ CA_deviceRotLocYUp
The device rotation controls the camera rotation and the GPS controls the Camera Translation.
Definition: SLEnums.h:128
@ CA_trackball
Orbiting around central object w. one rotation around one axis.
Definition: SLEnums.h:124
@ CA_deviceRotYUp
The device rotation controls the camera rotation.
Definition: SLEnums.h:127
@ CA_turntableZUp
Orbiting around central object w. turntable rotation around z & right axis.
Definition: SLEnums.h:123
@ CA_walkingZUp
Walk translation with AWSD and look around rotation around z & right axis.
Definition: SLEnums.h:126
SLProjType
Enumeration for different camera projections.
Definition: SLEnums.h:134
@ P_monoPerspective
standard mono pinhole perspective projection
Definition: SLEnums.h:135
@ P_stereoSideBySideP
side-by-side proportional for mirror stereoscopes
Definition: SLEnums.h:139
@ P_monoIntrinsic
standard mono pinhole perspective projection from intrinsic calibration
Definition: SLEnums.h:136
@ P_stereoPixelByPixel
checkerboard pattern (DLP3D)
Definition: SLEnums.h:143
@ P_stereoColumnByColumn
column-by-column
Definition: SLEnums.h:142
@ P_stereoColorRG
color masking for red-green anaglyphs
Definition: SLEnums.h:145
@ P_stereoSideBySideD
side-by-side distorted for Oculus Rift like glasses
Definition: SLEnums.h:140
@ P_stereoSideBySide
side-by-side
Definition: SLEnums.h:138
@ P_stereoColorYB
color masking for yellow-blue anaglyphs (ColorCode 3D)
Definition: SLEnums.h:147
@ P_stereoLineByLine
line-by-line
Definition: SLEnums.h:141
@ P_stereoColorRB
color masking for red-blue anaglyphs
Definition: SLEnums.h:146
@ P_stereoColorRC
color masking for red-cyan anaglyphs
Definition: SLEnums.h:144
@ P_monoOrthographic
standard mono orthographic projection
Definition: SLEnums.h:137
SLLogVerbosity
Definition: SLEnums.h:244
@ LV_diagnostic
Definition: SLEnums.h:249
@ LV_normal
Definition: SLEnums.h:247
@ LV_minimal
Definition: SLEnums.h:246
@ LV_quiet
Definition: SLEnums.h:245
@ LV_detailed
Definition: SLEnums.h:248
SLAxis
Coordinate axis enumeration.
Definition: SLEnums.h:79
@ A_z
Definition: SLEnums.h:82
@ A_y
Definition: SLEnums.h:81
@ A_x
Definition: SLEnums.h:80
SLAnimInterpolation
Enumeration for animation modes.
Definition: SLEnums.h:160
@ AI_linear
Definition: SLEnums.h:161
@ AI_bezier
Definition: SLEnums.h:162
int SLSceneID
Scene identifier.
Definition: SLEnums.h:91
SLRenderType
Rendering type enumeration.
Definition: SLEnums.h:69
@ RT_rt
Ray Tracing.
Definition: SLEnums.h:71
@ RT_pt
Path Tracing.
Definition: SLEnums.h:72
@ RT_gl
OpenGL.
Definition: SLEnums.h:70
@ RT_optix_pt
Path Tracing with OptiX.
Definition: SLEnums.h:74
@ RT_optix_rt
Ray Tracing with OptiX.
Definition: SLEnums.h:73
SLShaderType
Shader type enumeration for vertex or fragment (pixel) shader.
Definition: SLEnums.h:222
@ ST_tesselation
Definition: SLEnums.h:227
@ ST_vertex
Definition: SLEnums.h:224
@ ST_none
Definition: SLEnums.h:223
@ ST_geometry
Definition: SLEnums.h:226
@ ST_fragment
Definition: SLEnums.h:225
SLEasingCurve
Enumeration for animation easing curves.
Definition: SLEnums.h:180
@ EC_inOutQuart
quartic easing in and then out
Definition: SLEnums.h:192
@ EC_inCubic
cubic in easing in, acceleration from zero velocity
Definition: SLEnums.h:186
@ EC_outQuart
quartic easing out, decelerating to zero velocity
Definition: SLEnums.h:191
@ EC_outInQuint
quintic easing out and then in
Definition: SLEnums.h:197
@ EC_inOutCubic
cubic easing in and then out
Definition: SLEnums.h:188
@ EC_outCubic
cubic easing out, decelerating to zero velocity
Definition: SLEnums.h:187
@ EC_outInSine
sine easing out and then in
Definition: SLEnums.h:201
@ EC_outInQuad
quadratic easing out and then in
Definition: SLEnums.h:185
@ EC_inOutQuad
quadratic easing in and then out
Definition: SLEnums.h:184
@ EC_inOutSine
sine easing in and then out
Definition: SLEnums.h:200
@ EC_outInCubic
cubic easing out and then in
Definition: SLEnums.h:189
@ EC_inSine
sine easing in, acceleration from zero velocity
Definition: SLEnums.h:198
@ EC_inQuart
quartic easing in, acceleration from zero velocity
Definition: SLEnums.h:190
@ EC_outQuint
quintic easing out, decelerating to zero velocity
Definition: SLEnums.h:195
@ EC_outQuad
quadratic easing out, decelerating to zero velocity
Definition: SLEnums.h:183
@ EC_linear
linear easing with constant velocity
Definition: SLEnums.h:181
@ EC_inOutQuint
quintic easing in and then out
Definition: SLEnums.h:196
@ EC_outInQuart
quartic easing out and then in
Definition: SLEnums.h:193
@ EC_inQuad
quadratic easing in, acceleration from zero velocity
Definition: SLEnums.h:182
@ EC_inQuint
quintic easing in, acceleration from zero velocity
Definition: SLEnums.h:194
@ EC_outSine
sine easing out, decelerating to zero velocity
Definition: SLEnums.h:199
SLTransformSpace
Describes the relative space a transformation is applied in.
Definition: SLEnums.h:206
@ TS_world
Definition: SLEnums.h:208
@ TS_parent
Definition: SLEnums.h:209
@ TS_object
Definition: SLEnums.h:210
SLShapeType
Particle system shape type.
Definition: SLEnums.h:279
@ ST_Sphere
Definition: SLEnums.h:280
@ ST_Pyramid
Definition: SLEnums.h:283
@ ST_Box
Definition: SLEnums.h:281
@ ST_Cone
Definition: SLEnums.h:282
SLTextAlign
Enumeration for text alignment in a box.
Definition: SLEnums.h:107
@ TA_topCenter
Definition: SLEnums.h:109
@ TA_centerRight
Definition: SLEnums.h:113
@ TA_topLeft
Definition: SLEnums.h:108
@ TA_bottomCenter
Definition: SLEnums.h:115
@ TA_bottomLeft
Definition: SLEnums.h:114
@ TA_topRight
Definition: SLEnums.h:110
@ TA_centerLeft
Definition: SLEnums.h:111
@ TA_bottomRight
Definition: SLEnums.h:116
@ TA_centerCenter
Definition: SLEnums.h:112
SLReflectionModel
Light Reflection Models for shader generation usd in SLMaterial.
Definition: SLEnums.h:288
@ RM_BlinnPhong
Definition: SLEnums.h:289
@ RM_Custom
Definition: SLEnums.h:292
@ RM_Particle
Definition: SLEnums.h:291
@ RM_CookTorrance
Definition: SLEnums.h:290
SLAnimLooping
Enumeration for animation modes.
Definition: SLEnums.h:167
@ AL_loop
loop
Definition: SLEnums.h:169
@ AL_pingPongLoop
loop forward and backwards
Definition: SLEnums.h:171
@ AL_once
play once
Definition: SLEnums.h:168
@ AL_pingPong
play once in two directions
Definition: SLEnums.h:170
SLMouseButton
Mouse button codes.
Definition: SLEnums.h:98
@ MB_none
Definition: SLEnums.h:99
@ MB_left
Definition: SLEnums.h:100
@ MB_right
Definition: SLEnums.h:102
@ MB_middle
Definition: SLEnums.h:101
SLFogMode
Corresponds to the old fog modes in OpenGL 2.1.
Definition: SLEnums.h:263
@ FM_exp
Definition: SLEnums.h:265
@ FM_exp2
Definition: SLEnums.h:266
@ FM_linear
Definition: SLEnums.h:264
SLUniformType
Type definition for GLSL uniform1f variables that change per frame.
Definition: SLEnums.h:232
@ UT_seconds
seconds since the process has started
Definition: SLEnums.h:238
@ UT_incDec
never ending loop from min to max and max to min
Definition: SLEnums.h:234
@ UT_inc
never ending increment
Definition: SLEnums.h:236
@ UT_incInc
never ending loop from min to max
Definition: SLEnums.h:235
@ UT_random
random values between min and max
Definition: SLEnums.h:237
@ UT_const
constant value
Definition: SLEnums.h:233
@ UT_lambda
lambda getter function
Definition: SLEnums.h:239
SLViewportAlign
Mouse button codes.
Definition: SLEnums.h:254
@ VA_leftOrBottom
Definition: SLEnums.h:256
@ VA_center
Definition: SLEnums.h:255
SLBillboardType
Billboard type for its orientation used in SLParticleSystem.
Definition: SLEnums.h:271
@ BT_Camera
Definition: SLEnums.h:272
@ BT_Horizontal
Definition: SLEnums.h:274
@ BT_Vertical
Definition: SLEnums.h:273
SLEyeType
Enumeration for stereo eye type used for camera projection.
Definition: SLEnums.h:152
@ ET_center
Definition: SLEnums.h:154
@ ET_right
Definition: SLEnums.h:155
@ ET_left
Definition: SLEnums.h:153
SLSkinMethod
Skinning methods.
Definition: SLEnums.h:215
@ SM_hardware
Do vertex skinning on the GPU.
Definition: SLEnums.h:216
@ SM_software
Do vertex skinning on the CPU.
Definition: SLEnums.h:217
constexpr SLSceneID SL_EMPTY_SCENE_ID
SLSceneID for an empty scene.
Definition: SLEnums.h:94
SLKey
Keyboard key codes enumeration.
Definition: SLEnums.h:16
@ K_down
Definition: SLEnums.h:25
@ K_NP5
Definition: SLEnums.h:38
@ K_delete
Definition: SLEnums.h:23
@ K_space
Definition: SLEnums.h:18
@ K_F2
Definition: SLEnums.h:50
@ K_F1
Definition: SLEnums.h:49
@ K_F12
Definition: SLEnums.h:60
@ K_NP9
Definition: SLEnums.h:42
@ K_F6
Definition: SLEnums.h:54
@ K_F4
Definition: SLEnums.h:52
@ K_up
Definition: SLEnums.h:24
@ K_enter
Definition: SLEnums.h:20
@ K_esc
Definition: SLEnums.h:21
@ K_none
Definition: SLEnums.h:17
@ K_tab
Definition: SLEnums.h:19
@ K_NP6
Definition: SLEnums.h:39
@ K_shift
Definition: SLEnums.h:62
@ K_end
Definition: SLEnums.h:29
@ K_insert
Definition: SLEnums.h:30
@ K_right
Definition: SLEnums.h:26
@ K_NPEnter
Definition: SLEnums.h:47
@ K_F9
Definition: SLEnums.h:57
@ K_NPDivide
Definition: SLEnums.h:43
@ K_pageDown
Definition: SLEnums.h:32
@ K_F8
Definition: SLEnums.h:56
@ K_F5
Definition: SLEnums.h:53
@ K_pageUp
Definition: SLEnums.h:31
@ K_NPMultiply
Definition: SLEnums.h:44
@ K_NPSubtract
Definition: SLEnums.h:46
@ K_NP8
Definition: SLEnums.h:41
@ K_NP1
Definition: SLEnums.h:34
@ K_NP3
Definition: SLEnums.h:36
@ K_ctrl
Definition: SLEnums.h:63
@ K_NP7
Definition: SLEnums.h:40
@ K_NP2
Definition: SLEnums.h:35
@ K_F10
Definition: SLEnums.h:58
@ K_F11
Definition: SLEnums.h:59
@ K_NP4
Definition: SLEnums.h:37
@ K_super
Definition: SLEnums.h:61
@ K_F3
Definition: SLEnums.h:51
@ K_F7
Definition: SLEnums.h:55
@ K_alt
Definition: SLEnums.h:64
@ K_left
Definition: SLEnums.h:27
@ K_NP0
Definition: SLEnums.h:33
@ K_backspace
Definition: SLEnums.h:22
@ K_home
Definition: SLEnums.h:28
@ K_NPDecimal
Definition: SLEnums.h:48
@ K_NPAdd
Definition: SLEnums.h:45