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