-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain3.cpp
More file actions
22 lines (16 loc) · 847 Bytes
/
Main3.cpp
File metadata and controls
22 lines (16 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "Exodia.hpp"
#include "Client/SoftBodyApp.hpp"
#include "Client/OrbitCamera.hpp"
#include "Client/SceneFactory.hpp"
int main()
{
SoftBodySimulationApp app;
int resolution = 32;
auto carpet = SceneFactory::CreateCarpet(app.GetScene(), app.GetRenderer(), app.GetSolver(), resolution, { 0.0, 2.0f, 0.0 }, { 0.0f, 0.0f, 0.0f }, { 10.0f, 1.0f, 10.0f });
carpet->AddFixedConstraint(std::make_shared<FixedConstraint>(carpet->GetParticles()[0]));
carpet->AddFixedConstraint(std::make_shared<FixedConstraint>(carpet->GetParticles()[resolution - 1]));
carpet->AddFixedConstraint(std::make_shared<FixedConstraint>(carpet->GetParticles()[resolution * (resolution - 1)]));
carpet->AddFixedConstraint(std::make_shared<FixedConstraint>(carpet->GetParticles()[resolution * resolution - 1]));
app.Run();
return 0;
}