new helper methods

particle traps
This commit is contained in:
2016-10-01 10:22:14 +02:00
parent 4a0442f511
commit 729340031d
2 changed files with 6 additions and 1 deletions

View File

@@ -91,7 +91,7 @@ public:
}
//if (cnt != 0) {probability /= cnt;} else {probability = 1.0;}
probability = curNode->getWalkImportance() < 0.4f ? (1e-5) : (1.0); // "kill" particles that walk near walls (most probably trapped ones)
probability *= curNode->getWalkImportance() < 0.4f ? (1e-5) : (1.0); // "kill" particles that walk near walls (most probably trapped ones)
// update after
updateAfter(currentState, *startNode, *curNode);