public void addForce(THREE.Vector3 force) { THREE.Vector3 a = force.clone(); a.multiplyScalar(invMass); acc.add(a); }
public Particle(double m, THREE.Vector3 pos) { position = pos.clone(); previous = pos.clone(); original = pos.clone(); acc = new THREE.Vector3(0, 0, 0); mass = m; invMass = 1.0 / mass; }