Package toxi.sim.fluids
Class FluidSolver3D
java.lang.Object
toxi.sim.fluids.FluidSolver3D
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDensity
(int x, int y, int z, float amount) void
addVelocity
(int x, int y, int z, Vec3D amount) void
clearAt
(int x, int y, int z) final void
decay
(float decay) float[]
void
setAt
(int x, int y, int z, float dens, ReadonlyVec3D vel) void
update()
-
Field Details
-
diff
public float diff -
visc
public float visc
-
-
Constructor Details
-
FluidSolver3D
public FluidSolver3D(int size, float diffusion, float viscosity, float dt)
-
-
Method Details
-
addDensity
public void addDensity(int x, int y, int z, float amount) -
addVelocity
-
clearAt
public void clearAt(int x, int y, int z) -
decay
public final void decay(float decay) -
getDensity
public float[] getDensity()- Returns:
- the density
-
setAt
-
update
public void update()
-