Commit 99b9f859 authored by ruiliang.gao's avatar ruiliang.gao Committed by Sreekanth Arikatla
Browse files

REFAC: Updated the PBDFluidsExample according to the Collision Handler

parent 885d88be
......@@ -25,6 +25,8 @@
#include "imstkPbdSolver.h"
#include "imstkOneToOneMap.h"
#include "imstkAPIUtilities.h"
#include "imstkMeshToMeshBruteForceCD.h"
#include "imstkPBDCollisionHandling.h"
using namespace imstk;
......@@ -234,10 +236,10 @@ int main()
// Collisions
auto colGraph = scene->getCollisionGraph();
auto pair = std::make_shared<PbdInteractionPair>(PbdInteractionPair(deformableObj, floor));
pair->setNumberOfInterations(2);
colGraph->addInteractionPair(pair);
auto CD = std::make_shared<MeshToMeshBruteForceCD>(fluidMesh, floorMeshColliding, nullptr);
auto CH = std::make_shared<PBDCollisionHandling>(CollisionHandling::Side::A,
CD->getCollisionData(), deformableObj, floor, pbdSolver);
colGraph->addInteractionPair(deformableObj, floor, CD, CH, nullptr);
// Light (white)
auto whiteLight = std::make_shared<DirectionalLight>("whiteLight");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment