private Cloth(int w, int h) : base() { NrU = w; NrV = h; ballConstrain = new BallConstrain(new THREE.Vector3(0, -30, 0), 55); ballConstrain.Apply = false; objectconstraines.Append(ballConstrain); boxConstrain = new BoxConstrain(new THREE.Vector3(0, -90, 0),100.0,100.0,100.0); boxConstrain.Apply = true; objectconstraines.Append(boxConstrain); windForce = new RandomWindForce(); windForce.Apply = false; gravityForce = new YGravity(ParticleConstants.SPEEDFACTOR * 0.00004/ ParticleConstants.TIMESQR); globalForces.Push(windForce); globalForces.Push(gravityForce); CreateParticles(); MakeConstrains(); //SetFixed(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,17,20); FixRange(0, NrU); //SetFixed(0, NrU / 2, NrU); // cloth geometry Geometry = new THREE.ParametricGeometry(this.ParamFunction, NrU, NrV); Geometry.dynamic = true; }
public Carpet() : base() { NrU = 30; NrV = 30; ballConstrain = new BallConstrain(new THREE.Vector3(-220, -350, 0), 350); ballConstrain.Apply = true; objectconstraines.Append(ballConstrain); //ballConstrain = new BallConstrain(new THREE.Vector3(150, -80, 0), 80); //ballConstrain.Apply = true; //Allconstraines.Append(ballConstrain); boxConstrain = new BoxConstrain(new THREE.Vector3(+180, -20, 0), 250.0, 250.0, 250); boxConstrain.Apply = true; objectconstraines.Append(boxConstrain); windForce = new RandomWindForce(); windForce.Apply = false; globalForces.Push(windForce); gravityForce = new YGravity(ParticleConstants.SPEEDFACTOR * 0.00004 / ParticleConstants.TIMESQR); globalForces.Push(gravityForce); CreateParticles(); MakeConstrains(); Geometry = new THREE.ParametricGeometry(this.ParamFunction, NrU, NrV); Geometry.dynamic = true; }
private Cloth(int w, int h) : base() { NrU = w; NrV = h; ballConstrain = new BallConstrain(new THREE.Vector3(0, -30, 0), 55); ballConstrain.Apply = false; objectconstraines.Append(ballConstrain); boxConstrain = new BoxConstrain(new THREE.Vector3(0, -90, 0), 100.0, 100.0, 100.0); boxConstrain.Apply = true; objectconstraines.Append(boxConstrain); windForce = new RandomWindForce(); windForce.Apply = false; gravityForce = new YGravity(ParticleConstants.SPEEDFACTOR * 0.00004 / ParticleConstants.TIMESQR); globalForces.Push(windForce); globalForces.Push(gravityForce); CreateParticles(); MakeConstrains(); //SetFixed(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,17,20); FixRange(0, NrU); //SetFixed(0, NrU / 2, NrU); // cloth geometry Geometry = new THREE.ParametricGeometry(this.ParamFunction, NrU, NrV); Geometry.dynamic = true; }
public ParametricSurface() { objectconstraines = new ConstrainedList(); globalForces = new GlobalForce[0]; }