Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/mantaflow/preprocessed/plugin/flip.cpp')
-rw-r--r--extern/mantaflow/preprocessed/plugin/flip.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/extern/mantaflow/preprocessed/plugin/flip.cpp b/extern/mantaflow/preprocessed/plugin/flip.cpp
index 1acdac1c094..eaa1ebe45d5 100644
--- a/extern/mantaflow/preprocessed/plugin/flip.cpp
+++ b/extern/mantaflow/preprocessed/plugin/flip.cpp
@@ -41,7 +41,7 @@ void sampleFlagsWithParticles(const FlagGrid &flags,
const bool is3D = flags.is3D();
const Real jlen = randomness / discretization;
const Vec3 disp(1.0 / discretization, 1.0 / discretization, 1.0 / discretization);
- RandomStream mRand(9832);
+ RandomStream rand(parts.getSeed());
FOR_IJK_BND(flags, 0)
{
@@ -53,7 +53,7 @@ void sampleFlagsWithParticles(const FlagGrid &flags,
for (int dj = 0; dj < discretization; dj++)
for (int di = 0; di < discretization; di++) {
Vec3 subpos = pos + disp * Vec3(0.5 + di, 0.5 + dj, 0.5 + dk);
- subpos += jlen * (Vec3(1, 1, 1) - 2.0 * mRand.getVec3());
+ subpos += jlen * (Vec3(1, 1, 1) - 2.0 * rand.getVec3());
if (!is3D)
subpos[2] = 0.5;
parts.addBuffered(subpos);
@@ -113,7 +113,7 @@ void sampleLevelsetWithParticles(const LevelsetGrid &phi,
const bool is3D = phi.is3D();
const Real jlen = randomness / discretization;
const Vec3 disp(1.0 / discretization, 1.0 / discretization, 1.0 / discretization);
- RandomStream mRand(9832);
+ RandomStream rand(parts.getSeed());
if (reset) {
parts.clear();
@@ -132,7 +132,7 @@ void sampleLevelsetWithParticles(const LevelsetGrid &phi,
for (int dj = 0; dj < discretization; dj++)
for (int di = 0; di < discretization; di++) {
Vec3 subpos = pos + disp * Vec3(0.5 + di, 0.5 + dj, 0.5 + dk);
- subpos += jlen * (Vec3(1, 1, 1) - 2.0 * mRand.getVec3());
+ subpos += jlen * (Vec3(1, 1, 1) - 2.0 * rand.getVec3());
if (!is3D)
subpos[2] = 0.5;
if (phi.getInterpolated(subpos) > 0.)
@@ -205,7 +205,7 @@ void sampleShapeWithParticles(const Shape &shape,
const bool is3D = flags.is3D();
const Real jlen = randomness / discretization;
const Vec3 disp(1.0 / discretization, 1.0 / discretization, 1.0 / discretization);
- RandomStream mRand(9832);
+ RandomStream rand(parts.getSeed());
if (reset) {
parts.clear();
@@ -223,7 +223,7 @@ void sampleShapeWithParticles(const Shape &shape,
for (int dj = 0; dj < discretization; dj++)
for (int di = 0; di < discretization; di++) {
Vec3 subpos = pos + disp * Vec3(0.5 + di, 0.5 + dj, 0.5 + dk);
- subpos += jlen * (Vec3(1, 1, 1) - 2.0 * mRand.getVec3());
+ subpos += jlen * (Vec3(1, 1, 1) - 2.0 * rand.getVec3());
if (!is3D)
subpos[2] = 0.5;
if (exclude && exclude->getInterpolated(subpos) <= 0.)
@@ -576,7 +576,7 @@ void adjustNumber(BasicParticleSystem &parts,
}
// seed new particles
- RandomStream mRand(9832);
+ RandomStream rand(parts.getSeed());
FOR_IJK(tmp)
{
int cnt = tmp(i, j, k);
@@ -593,7 +593,7 @@ void adjustNumber(BasicParticleSystem &parts,
if (flags.isFluid(i, j, k) && cnt < minParticles) {
for (int m = cnt; m < minParticles; m++) {
- Vec3 pos = Vec3(i, j, k) + mRand.getVec3();
+ Vec3 pos = Vec3(i, j, k) + rand.getVec3();
// Vec3 pos (i + 0.5, j + 0.5, k + 0.5); // cell center
parts.addBuffered(pos);
}