PeriDyno 1.2.1
Loading...
Searching...
No Matches
UbiApp.cpp
Go to the documentation of this file.
1#include "UbiApp.h"
2
3namespace dyno
4{
6 : AppBase()
7 {
8 if (type == GUIType::GUI_GLFW)
9 {
10 mApp = new GlfwApp;
11 }
12
13 if (type == GUIType::GUI_QT)
14 {
15#if (defined QT_GUI_SUPPORTED)
16 mApp = new QtApp;
17#else
18 mApp = new GlfwApp;
19#endif
20 }
21
22 if (type == GUIType::GUI_WT)
23 {
24#if (defined WT_GUI_SUPPORTED)
25 mApp = new WtApp;
26#else
27 mApp = new GlfwApp;
28#endif
29 }
30 }
31
33 {
34 delete mApp;
35 }
36
37 void UbiApp::initialize(int width, int height, bool usePlugin /*= false*/)
38 {
39 mApp->initialize(width, height, usePlugin);
40 }
41
43 {
44 return mApp->renderWindow();
45 }
46
48 {
49 mApp->mainLoop();
50 }
51
52}
void mainLoop() override
Definition UbiApp.cpp:47
AppBase * mApp
Definition UbiApp.h:53
RenderWindow * renderWindow()
Definition UbiApp.cpp:42
UbiApp(GUIType type=GUIType::GUI_GLFW)
Definition UbiApp.cpp:5
void initialize(int width, int height, bool usePlugin=false) override
Definition UbiApp.cpp:37
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
GUIType
Definition UbiApp.h:31
@ GUI_WT
Definition UbiApp.h:34
@ GUI_QT
Definition UbiApp.h:33
@ GUI_GLFW
Definition UbiApp.h:32