Esempio n. 1
0
 public Oni.FluidMaterial GetEquivalentOniMaterial()
 {
     Oni.FluidMaterial material = new Oni.FluidMaterial();
     material.smoothingRadius     = smoothingRadius;
     material.restDensity         = restDensity;
     material.viscosity           = viscosity;
     material.surfaceTension      = surfaceTension;
     material.buoyancy            = buoyancy;
     material.atmosphericDrag     = atmosphericDrag;
     material.atmosphericPressure = atmosphericPressure;
     material.vorticity           = vorticity;
     return(material);
 }
Esempio n. 2
0
 public override Oni.FluidMaterial GetEquivalentOniMaterial(Oni.SolverParameters.Mode mode)
 {
     Oni.FluidMaterial material = new Oni.FluidMaterial();
     material.smoothingRadius     = GetParticleSize(mode);
     material.restDensity         = restDensity;
     material.viscosity           = 0;
     material.surfaceTension      = 0;
     material.buoyancy            = -1;
     material.atmosphericDrag     = 0;
     material.atmosphericPressure = 0;
     material.vorticity           = 0;
     return(material);
 }
Esempio n. 3
0
        public float plasticThreshold;  /**< amount of stretching stress that a elastic material must undergo to become plastic.*/

        public Oni.FluidMaterial GetEquivalentOniMaterial()
        {
            Oni.FluidMaterial material = new Oni.FluidMaterial();
            material.stiffness      = stiffness;
            material.restDistance   = restDistance;
            material.restDensity    = restDensity;
            material.viscosity      = viscosity;
            material.cohesion       = cohesion;
            material.surfaceTension = surfaceTension;
            material.buoyancy       = buoyancy;
            material.drag           = drag;
            material.vorticity      = vorticity;
            return(material);
        }
        public override Oni.FluidMaterial GetEquivalentOniMaterial(Oni.SolverParameters.Mode mode)
        {
            Oni.FluidMaterial material = new Oni.FluidMaterial();

            // smoothing radius must be at least twice the particle radius, so that particle centers can reach each other. That's why the size is not multiplied by 0.5f.
            material.smoothingRadius     = GetParticleSize(mode) * smoothing;
            material.restDensity         = restDensity;
            material.viscosity           = viscosity;
            material.surfaceTension      = surfaceTension;
            material.buoyancy            = buoyancy;
            material.atmosphericDrag     = atmosphericDrag;
            material.atmosphericPressure = atmosphericPressure;
            material.vorticity           = vorticity;
            return(material);
        }