Skip to content
Snippets Groups Projects
Verified Commit 5fccd805 authored by Josch Morgenstern's avatar Josch Morgenstern
Browse files

[#111] change constraints

parent a453cbb4
Branches
Tags
1 merge request!95Resolve "Wassersimulation mit Interaktion"
......@@ -45,10 +45,10 @@ void main() {
vec3 pos_new = inParticle[id].position + dt * vel_new;
// Überprüfe Randbedingungen x
if (inParticle[id].position.x < -0.6)
if (inParticle[id].position.x < 0.2)
{
vel_new.x *= -ABSORBTION;
pos_new.x = -0.6;
pos_new.x = 0.2;
}
else if (inParticle[id].position.x > 0.6)
{
......@@ -57,23 +57,23 @@ void main() {
}
// Überprüfe Randbedingungen y
if (inParticle[id].position.y < -0.8)
if (inParticle[id].position.y < 0.2)
{
vel_new.y *= -ABSORBTION;
pos_new.y = -0.8;
pos_new.y = 0.2;
}
else if (inParticle[id].position.y > 0.8)
else if (inParticle[id].position.y > 0.6)
{
vel_new.y *= -ABSORBTION;
pos_new.y = 0.8;
pos_new.y = 0.6;
}
// Überprüfe Randbedingungen z
if (inParticle[id].position.z < -0.6 )
if (inParticle[id].position.z < 0.2 )
{
vel_new.z *= -ABSORBTION;
pos_new.z = -0.6;
pos_new.z = 0.2;
}
else if (inParticle[id].position.z > 0.6 )
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment