-
Notifications
You must be signed in to change notification settings - Fork 335
Expand file tree
/
Copy pathmain.cpp
More file actions
43 lines (35 loc) · 958 Bytes
/
Copy pathmain.cpp
File metadata and controls
43 lines (35 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "SPlisHSPlasH/Common.h"
#include "Simulator/SimulatorBase.h"
#include "Simulator/GUI/OpenGL/Simulator_OpenGL.h"
#include "PositionBasedDynamicsWrapper/PBDBoundarySimulator.h"
#include "Simulator/GUI/imgui/Simulator_GUI_imgui.h"
#include "PositionBasedDynamicsWrapper/PBD_Simulator_GUI_imgui.h"
// Enable memory leak detection
#ifdef _DEBUG
#ifndef EIGEN_ALIGN
#define new DEBUG_NEW
#endif
#endif
using namespace SPH;
using namespace std;
SimulatorBase *base = nullptr;
Simulator_GUI_Base *gui = nullptr;
// main
int main( int argc, char **argv )
{
REPORT_MEMORY_LEAKS;
base = new SimulatorBase();
base->init(argc, argv, "SPlisHSPlasH");
if (base->getUseGUI())
{
if (base->isStaticScene())
gui = new Simulator_GUI_imgui(base);
else
gui = new PBD_Simulator_GUI_imgui(base, ((PBDBoundarySimulator*)base->getBoundarySimulator())->getPBDWrapper());
base->setGui(gui);
}
base->run();
delete base;
delete gui;
return 0;
}